home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-04-10 | 481.9 KB | [ONLN/HLX2] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Wed Jul 21 10:48:32 1993, modified Mon Apr 10 13:00:15 1995, creator 'HLX2', type 'ONLN', 485839 bytes "QD GX for PostScript Prog." , at 0x76a4f 7410 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
100%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [ONLN] |
macFileCreator | [HLX2] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 1a 51 44 20 47 58 20 | 66 6f 72 20 50 6f 73 74 |..QD GX |for Post|
|00000010| 53 63 72 69 70 74 20 50 | 72 6f 67 2e 00 00 00 00 |Script P|rog.....|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 07 69 cf 00 | 00 1c f2 a8 73 07 c0 ab |.....i..|....s...|
|00000060| af 14 9f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 69 a8 00 00 |........|....i...|
|00000080| 51 55 49 43 4b 44 52 41 | 57 20 47 58 20 46 4f 52 |QUICKDRA|W GX FOR|
|00000090| 20 50 4f 53 54 53 43 52 | 49 50 54 20 50 52 4f 47 | POSTSCR|IPT PROG|
|000000a0| 52 41 4d 4d 45 52 53 0d | 44 41 4e 49 45 4c 20 4c |RAMMERS.|DANIEL L|
|000000b0| 49 50 54 4f 4e 0d 57 69 | 74 68 20 51 75 69 63 6b |IPTON.Wi|th Quick|
|000000c0| 44 72 61 77 20 47 58 2c | 20 74 68 65 20 4d 61 63 |Draw GX,| the Mac|
|000000d0| 69 6e 74 6f 73 68 20 67 | 65 74 73 20 61 20 62 72 |intosh g|ets a br|
|000000e0| 61 6e 64 20 6e 65 77 2c | 20 70 6f 77 65 72 66 75 |and new,| powerfu|
|000000f0| 6c 2c 20 61 6e 64 20 74 | 6f 74 61 6c 6c 79 20 64 |l, and t|otally d|
|00000100| 69 66 66 65 72 65 6e 74 | 20 6d 6f 64 65 6c 20 66 |ifferent| model f|
|00000110| 6f 72 20 74 65 78 74 20 | 61 6e 64 20 67 72 61 70 |or text |and grap|
|00000120| 68 69 63 73 2e 20 50 72 | 6f 67 72 61 6d 6d 65 72 |hics. Pr|ogrammer|
|00000130| 73 20 6f 66 20 67 72 61 | 70 68 69 63 73 20 61 6e |s of gra|phics an|
|00000140| 64 20 70 61 67 65 20 6c | 61 79 6f 75 74 20 61 70 |d page l|ayout ap|
|00000150| 70 6c 69 63 61 74 69 6f | 6e 73 20 61 63 63 75 73 |plicatio|ns accus|
|00000160| 74 6f 6d 65 64 20 74 6f | 20 75 73 69 6e 67 20 63 |tomed to| using c|
|00000170| 75 73 74 6f 6d 20 50 6f | 73 74 53 63 72 69 70 74 |ustom Po|stScript|
|00000180| 20 63 6f 64 65 20 64 75 | 72 69 6e 67 20 74 68 65 | code du|ring the|
|00000190| 20 70 72 69 6e 74 69 6e | 67 20 70 72 6f 63 65 73 | printin|g proces|
|000001a0| 73 20 77 69 6c 6c 20 68 | 61 76 65 20 74 6f 20 6c |s will h|ave to l|
|000001b0| 65 61 72 6e 20 6e 65 77 | 20 74 65 63 68 6e 69 71 |earn new| techniq|
|000001c0| 75 65 73 20 66 6f 72 20 | 69 6d 61 67 69 6e 67 20 |ues for |imaging |
|000001d0| 6f 6e 20 74 68 65 20 4d | 61 63 69 6e 74 6f 73 68 |on the M|acintosh|
|000001e0| 2c 20 62 75 74 20 74 68 | 65 20 72 65 77 61 72 64 |, but th|e reward|
|000001f0| 20 69 73 20 61 20 72 6f | 62 75 73 74 20 66 65 61 | is a ro|bust fea|
|00000200| 74 75 72 65 20 73 65 74 | 2c 20 61 6e 20 65 61 73 |ture set|, an eas|
|00000210| 69 65 72 20 41 50 49 2c | 20 61 6e 64 20 63 6f 6e |ier API,| and con|
|00000220| 73 69 73 74 65 6e 74 20 | 6f 75 74 70 75 74 20 77 |sistent |output w|
|00000230| 68 65 74 68 65 72 20 74 | 6f 20 61 20 73 63 72 65 |hether t|o a scre|
|00000240| 65 6e 20 28 6f 66 20 61 | 6e 79 20 72 65 73 6f 6c |en (of a|ny resol|
|00000250| 75 74 69 6f 6e 20 6f 72 | 20 63 6f 6c 6f 72 20 64 |ution or| color d|
|00000260| 65 70 74 68 29 20 6f 72 | 20 61 20 70 72 69 6e 74 |epth) or| a print|
|00000270| 65 72 20 28 50 6f 73 74 | 53 63 72 69 70 74 2c 20 |er (Post|Script, |
|00000280| 72 61 73 74 65 72 2c 20 | 6f 72 20 76 65 63 74 6f |raster, |or vecto|
|00000290| 72 29 2e 20 54 68 69 73 | 20 61 72 74 69 63 6c 65 |r). This| article|
|000002a0| 20 73 68 6f 75 6c 64 20 | 68 65 6c 70 20 74 68 6f | should |help tho|
|000002b0| 73 65 20 70 72 6f 67 72 | 61 6d 6d 65 72 73 20 6d |se progr|ammers m|
|000002c0| 61 6b 65 20 74 68 65 20 | 74 72 61 6e 73 69 74 69 |ake the |transiti|
|000002d0| 6f 6e 2e 0d 51 75 69 63 | 6b 44 72 61 77 2c 20 77 |on..Quic|kDraw, w|
|000002e0| 68 69 6c 65 20 61 20 70 | 6f 77 65 72 66 75 6c 20 |hile a p|owerful |
|000002f0| 69 6d 61 67 69 6e 67 20 | 6d 6f 64 65 6c 20 66 6f |imaging |model fo|
|00000300| 72 20 69 74 73 20 74 69 | 6d 65 20 61 6e 64 20 77 |r its ti|me and w|
|00000310| 65 6c 6c 20 73 75 69 74 | 65 64 20 66 6f 72 20 69 |ell suit|ed for i|
|00000320| 6e 74 65 72 61 63 74 69 | 76 65 20 67 72 61 70 68 |nteracti|ve graph|
|00000330| 69 63 73 20 6f 6e 20 74 | 68 65 20 73 63 72 65 65 |ics on t|he scree|
|00000340| 6e 2c 20 6c 61 63 6b 73 | 20 6d 61 6e 79 20 66 65 |n, lacks| many fe|
|00000350| 61 74 75 72 65 73 20 64 | 65 6d 61 6e 64 65 64 20 |atures d|emanded |
|00000360| 62 79 20 74 6f 64 61 79 | d5 73 20 75 73 65 72 73 |by today|.s users|
|00000370| 2e 20 54 6f 20 70 72 6f | 76 69 64 65 20 66 65 61 |. To pro|vide fea|
|00000380| 74 75 72 65 73 20 73 75 | 63 68 20 61 73 20 74 72 |tures su|ch as tr|
|00000390| 61 6e 73 66 6f 72 6d 61 | 74 69 6f 6e 20 28 72 6f |ansforma|tion (ro|
|000003a0| 74 61 74 69 6f 6e 2c 20 | 73 6b 65 77 69 6e 67 2c |tation, |skewing,|
|000003b0| 20 61 6e 64 20 73 6f 20 | 6f 6e 29 20 61 6e 64 20 | and so |on) and |
|000003c0| 42 8e 7a 69 65 72 20 63 | 75 72 76 65 73 20 28 75 |B.zier c|urves (u|
|000003d0| 62 69 71 75 69 74 6f 75 | 73 20 69 6e 20 6d 6f 73 |biquitou|s in mos|
|000003e0| 74 20 6d 6f 64 65 72 6e | 20 67 72 61 70 68 69 63 |t modern| graphic|
|000003f0| 73 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 29 2c |s applic|ations),|
|00000400| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 20 69 6e | applica|tions in|
|00000410| 20 61 20 51 75 69 63 6b | 44 72 61 77 20 77 6f 72 | a Quick|Draw wor|
|00000420| 6c 64 20 6d 75 73 74 20 | 64 6f 20 6d 75 63 68 20 |ld must |do much |
|00000430| 6f 66 20 74 68 65 20 77 | 6f 72 6b 20 6f 66 20 64 |of the w|ork of d|
|00000440| 72 61 77 69 6e 67 20 74 | 6f 20 74 68 65 20 73 63 |rawing t|o the sc|
|00000450| 72 65 65 6e 20 74 68 65 | 6d 73 65 6c 76 65 73 2e |reen the|mselves.|
|00000460| 20 48 6f 77 65 76 65 72 | 2c 20 77 68 65 6e 20 70 | However|, when p|
|00000470| 72 69 6e 74 69 6e 67 20 | 74 6f 20 50 6f 73 74 53 |rinting |to PostS|
|00000480| 63 72 69 70 74 20 64 65 | 76 69 63 65 73 20 73 75 |cript de|vices su|
|00000490| 63 68 20 61 73 20 74 68 | 65 20 41 70 70 6c 65 20 |ch as th|e Apple |
|000004a0| 4c 61 73 65 72 57 72 69 | 74 65 72 2c 20 74 68 65 |LaserWri|ter, the|
|000004b0| 73 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 73 20 |se appli|cations |
|000004c0| 63 61 6e 20 6f 66 66 6c | 6f 61 64 20 6d 75 63 68 |can offl|oad much|
|000004d0| 20 6f 66 20 74 68 69 73 | 20 77 6f 72 6b 20 74 6f | of this| work to|
|000004e0| 20 74 68 65 20 70 72 69 | 6e 74 65 72 20 62 79 20 | the pri|nter by |
|000004f0| 73 69 6d 70 6c 79 20 75 | 73 69 6e 67 20 74 68 65 |simply u|sing the|
|00000500| 20 50 6f 73 74 53 63 72 | 69 70 74 20 6c 61 6e 67 | PostScr|ipt lang|
|00000510| 75 61 67 65 20 74 6f 20 | 64 72 61 77 20 6d 6f 73 |uage to |draw mos|
|00000520| 74 2c 20 69 66 20 6e 6f | 74 20 61 6c 6c 2c 20 6f |t, if no|t all, o|
|00000530| 66 20 74 68 65 69 72 20 | 67 72 61 70 68 69 63 73 |f their |graphics|
|00000540| 20 61 6e 64 20 74 65 78 | 74 2e 20 46 6f 72 20 74 | and tex|t. For t|
|00000550| 68 69 73 20 72 65 61 73 | 6f 6e 2c 20 6d 61 6e 79 |his reas|on, many|
|00000560| 20 4d 61 63 69 6e 74 6f | 73 68 20 61 70 70 6c 69 | Macinto|sh appli|
|00000570| 63 61 74 69 6f 6e 20 70 | 72 6f 67 72 61 6d 6d 65 |cation p|rogramme|
|00000580| 72 73 20 68 61 76 65 20 | 61 6c 73 6f 20 62 65 63 |rs have |also bec|
|00000590| 6f 6d 65 20 50 6f 73 74 | 53 63 72 69 70 74 20 70 |ome Post|Script p|
|000005a0| 72 6f 67 72 61 6d 6d 65 | 72 73 20 61 6e 64 20 6b |rogramme|rs and k|
|000005b0| 6e 6f 77 20 68 6f 77 20 | 74 6f 20 67 65 74 20 74 |now how |to get t|
|000005c0| 68 69 6e 67 73 20 64 6f | 6e 65 20 77 69 74 68 20 |hings do|ne with |
|000005d0| 74 68 65 20 50 6f 73 74 | 53 63 72 69 70 74 20 6c |the Post|Script l|
|000005e0| 61 6e 67 75 61 67 65 2e | 0d 57 48 41 54 20 49 53 |anguage.|.WHAT IS|
|000005f0| 20 50 4f 53 54 53 43 52 | 49 50 54 3f 0d 42 65 66 | POSTSCR|IPT?.Bef|
|00000600| 6f 72 65 20 67 65 74 74 | 69 6e 67 20 69 6e 74 6f |ore gett|ing into|
|00000610| 20 74 68 65 20 64 65 74 | 61 69 6c 73 20 6f 66 20 | the det|ails of |
|00000620| 68 6f 77 20 74 6f 20 6d | 61 6b 65 20 74 68 65 20 |how to m|ake the |
|00000630| 74 72 61 6e 73 69 74 69 | 6f 6e 20 66 72 6f 6d 20 |transiti|on from |
|00000640| 74 68 65 20 50 6f 73 74 | 53 63 72 69 70 74 20 6c |the Post|Script l|
|00000650| 61 6e 67 75 61 67 65 20 | 74 6f 20 51 75 69 63 6b |anguage |to Quick|
|00000660| 44 72 61 77 20 47 58 2c | 20 79 6f 75 20 6e 65 65 |Draw GX,| you nee|
|00000670| 64 20 74 6f 20 75 6e 64 | 65 72 73 74 61 6e 64 20 |d to und|erstand |
|00000680| 74 68 65 20 74 77 6f 20 | 6d 6f 64 65 6c 73 2e 20 |the two |models. |
|00000690| 54 68 65 20 61 72 74 69 | 63 6c 65 20 d2 47 65 74 |The arti|cle .Get|
|000006a0| 74 69 6e 67 20 53 74 61 | 72 74 65 64 20 57 69 74 |ting Sta|rted Wit|
|000006b0| 68 20 51 75 69 63 6b 44 | 72 61 77 20 47 58 d3 20 |h QuickD|raw GX. |
|000006c0| 69 6e 20 74 68 69 73 20 | 69 73 73 75 65 20 6f 66 |in this |issue of|
|000006d0| 20 64 65 76 65 6c 6f 70 | 20 70 72 6f 76 69 64 65 | develop| provide|
|000006e0| 73 20 61 6e 20 69 6e 74 | 72 6f 64 75 63 74 69 6f |s an int|roductio|
|000006f0| 6e 20 74 6f 20 51 75 69 | 63 6b 44 72 61 77 20 47 |n to Qui|ckDraw G|
|00000700| 58 2e 20 46 6f 72 20 61 | 6e 20 6f 76 65 72 76 69 |X. For a|n overvi|
|00000710| 65 77 20 6f 66 20 74 68 | 65 20 66 65 61 74 75 72 |ew of th|e featur|
|00000720| 65 73 20 6f 66 20 74 68 | 65 20 50 6f 73 74 53 63 |es of th|e PostSc|
|00000730| 72 69 70 74 20 6c 61 6e | 67 75 61 67 65 2c 20 72 |ript lan|guage, r|
|00000740| 65 61 64 20 6f 6e 2e 0d | 54 68 65 20 50 6f 73 74 |ead on..|The Post|
|00000750| 53 63 72 69 70 74 20 6c | 61 6e 67 75 61 67 65 20 |Script l|anguage |
|00000760| 69 73 20 70 72 6f 62 61 | 62 6c 79 20 62 65 73 74 |is proba|bly best|
|00000770| 20 6b 6e 6f 77 6e 20 61 | 73 20 61 20 72 6f 62 75 | known a|s a robu|
|00000780| 73 74 20 67 72 61 70 68 | 69 63 73 20 6d 6f 64 65 |st graph|ics mode|
|00000790| 6c 20 77 69 74 68 20 6d | 61 6e 79 20 63 61 70 61 |l with m|any capa|
|000007a0| 62 69 6c 69 74 69 65 73 | 2e 20 54 68 65 73 65 20 |bilities|. These |
|000007b0| 63 61 70 61 62 69 6c 69 | 74 69 65 73 20 69 6e 63 |capabili|ties inc|
|000007c0| 6c 75 64 65 20 74 68 65 | 20 61 62 69 6c 69 74 79 |lude the| ability|
|000007d0| 20 74 6f 20 66 69 6c 6c | 20 6f 72 20 66 72 61 6d | to fill| or fram|
|000007e0| 65 20 70 61 74 68 73 20 | 6d 61 64 65 20 75 70 20 |e paths |made up |
|000007f0| 6f 66 20 6c 69 6e 65 20 | 61 6e 64 20 63 75 62 69 |of line |and cubi|
|00000800| 63 20 42 8e 7a 69 65 72 | 20 73 65 67 6d 65 6e 74 |c B.zier| segment|
|00000810| 73 2c 20 72 65 6e 64 65 | 72 20 63 6f 6e 74 69 6e |s, rende|r contin|
|00000820| 75 6f 75 73 20 74 6f 6e | 65 20 69 6d 61 67 65 73 |uous ton|e images|
|00000830| 20 69 6e 20 62 6f 74 68 | 20 63 6f 6c 6f 72 20 61 | in both| color a|
|00000840| 6e 64 20 0d 67 72 61 79 | 73 63 61 6c 65 2c 20 74 |nd .gray|scale, t|
|00000850| 72 61 6e 73 66 6f 72 6d | 20 67 72 61 70 68 69 63 |ransform| graphic|
|00000860| 73 20 77 69 74 68 20 61 | 20 6d 61 74 72 69 78 2c |s with a| matrix,|
|00000870| 20 61 6e 64 20 63 6c 69 | 70 20 74 6f 20 61 20 70 | and cli|p to a p|
|00000880| 61 74 68 20 6d 61 64 65 | 20 75 70 20 6f 66 20 6c |ath made| up of l|
|00000890| 69 6e 65 20 61 6e 64 20 | 63 75 62 69 63 20 42 8e |ine and |cubic B.|
|000008a0| 7a 69 65 72 20 73 65 67 | 6d 65 6e 74 73 2e 20 50 |zier seg|ments. P|
|000008b0| 6f 73 74 53 63 72 69 70 | 74 20 63 6f 64 65 20 63 |ostScrip|t code c|
|000008c0| 61 6e 20 61 6c 73 6f 20 | 64 72 61 77 20 74 65 78 |an also |draw tex|
|000008d0| 74 20 69 6e 20 61 20 76 | 61 72 69 65 74 79 20 6f |t in a v|ariety o|
|000008e0| 66 20 64 69 66 66 65 72 | 65 6e 74 20 74 79 70 65 |f differ|ent type|
|000008f0| 66 61 63 65 73 20 61 6e | 64 20 6d 61 6e 69 70 75 |faces an|d manipu|
|00000900| 6c 61 74 65 20 74 68 69 | 73 20 74 65 78 74 20 61 |late thi|s text a|
|00000910| 73 20 61 20 67 72 61 70 | 68 69 63 2e 0d 54 6f 20 |s a grap|hic..To |
|00000920| 61 20 6c 69 6d 69 74 65 | 64 20 65 78 74 65 6e 74 |a limite|d extent|
|00000930| 20 74 68 65 20 50 6f 73 | 74 53 63 72 69 70 74 20 | the Pos|tScript |
|00000940| 6c 61 6e 67 75 61 67 65 | 20 69 73 20 61 6c 73 6f |language| is also|
|00000950| 20 61 20 70 72 69 6e 74 | 69 6e 67 20 6d 6f 64 65 | a print|ing mode|
|00000960| 6c 2e 20 43 65 72 74 61 | 69 6e 20 6f 70 65 72 61 |l. Certa|in opera|
|00000970| 74 6f 72 73 20 69 6e 20 | 74 68 65 20 50 6f 73 74 |tors in |the Post|
|00000980| 53 63 72 69 70 74 20 6c | 61 6e 67 75 61 67 65 20 |Script l|anguage |
|00000990| 61 72 65 20 72 65 6c 61 | 74 65 64 20 74 6f 20 70 |are rela|ted to p|
|000009a0| 72 69 6e 74 69 6e 67 2e | 20 54 68 65 73 65 20 69 |rinting.| These i|
|000009b0| 6e 63 6c 75 64 65 20 6f | 70 65 72 61 74 6f 72 73 |nclude o|perators|
|000009c0| 20 66 6f 72 20 70 61 67 | 65 20 63 6f 6e 74 72 6f | for pag|e contro|
|000009d0| 6c 20 28 73 68 6f 77 70 | 61 67 65 20 61 6e 64 20 |l (showp|age and |
|000009e0| 63 6f 70 79 70 61 67 65 | 29 2c 20 66 6f 72 20 63 |copypage|), for c|
|000009f0| 6f 6e 74 72 6f 6c 6c 69 | 6e 67 20 70 61 70 65 72 |ontrolli|ng paper|
|00000a00| 20 73 65 6c 65 63 74 69 | 6f 6e 2c 20 61 6e 64 20 | selecti|on, and |
|00000a10| 66 6f 72 20 63 6f 6e 74 | 72 6f 6c 6c 69 6e 67 20 |for cont|rolling |
|00000a20| 64 65 76 69 63 65 2d 73 | 70 65 63 69 66 69 63 20 |device-s|pecific |
|00000a30| 66 65 61 74 75 72 65 73 | 20 28 73 65 74 70 61 67 |features| (setpag|
|00000a40| 65 64 65 76 69 63 65 20 | 69 6e 20 50 6f 73 74 53 |edevice |in PostS|
|00000a50| 63 72 69 70 74 20 4c 65 | 76 65 6c 20 32 29 2e 0d |cript Le|vel 2)..|
|00000a60| 49 6e 20 61 64 64 69 74 | 69 6f 6e 2c 20 74 68 65 |In addit|ion, the|
|00000a70| 20 50 6f 73 74 53 63 72 | 69 70 74 20 6c 61 6e 67 | PostScr|ipt lang|
|00000a80| 75 61 67 65 20 73 65 72 | 76 65 73 20 61 73 20 61 |uage ser|ves as a|
|00000a90| 20 64 6f 63 75 6d 65 6e | 74 20 69 6e 74 65 72 63 | documen|t interc|
|00000aa0| 68 61 6e 67 65 20 66 6f | 72 6d 61 74 2e 20 53 69 |hange fo|rmat. Si|
|00000ab0| 6e 63 65 20 69 74 d5 73 | 20 73 6f 20 77 69 64 65 |nce it.s| so wide|
|00000ac0| 6c 79 20 61 76 61 69 6c | 61 62 6c 65 20 6f 6e 20 |ly avail|able on |
|00000ad0| 73 6f 20 6d 61 6e 79 20 | 64 69 66 66 65 72 65 6e |so many |differen|
|00000ae0| 74 20 70 6c 61 74 66 6f | 72 6d 73 20 61 6e 64 20 |t platfo|rms and |
|00000af0| 70 72 69 6e 74 65 72 73 | 2c 20 61 20 50 6f 73 74 |printers|, a Post|
|00000b00| 53 63 72 69 70 74 20 66 | 69 6c 65 20 63 61 6e 20 |Script f|ile can |
|00000b10| 62 65 20 74 72 65 61 74 | 65 64 20 61 73 20 61 20 |be treat|ed as a |
|00000b20| 64 65 76 69 63 65 2d 69 | 6e 64 65 70 65 6e 64 65 |device-i|ndepende|
|00000b30| 6e 74 20 64 6f 63 75 6d | 65 6e 74 20 69 6e 74 65 |nt docum|ent inte|
|00000b40| 72 63 68 61 6e 67 65 2e | 20 28 48 6f 77 65 76 65 |rchange.| (Howeve|
|00000b50| 72 2c 20 69 74 d5 73 20 | 6e 6f 74 20 65 61 73 69 |r, it.s |not easi|
|00000b60| 6c 79 20 65 64 69 74 65 | 64 20 65 78 63 65 70 74 |ly edite|d except|
|00000b70| 20 62 79 20 61 6e 20 65 | 78 70 65 72 74 2e 29 20 | by an e|xpert.) |
|00000b80| 53 69 6d 69 6c 61 72 6c | 79 2c 20 69 74 d5 73 20 |Similarl|y, it.s |
|00000b90| 61 6c 73 6f 20 75 73 65 | 64 20 74 6f 20 65 78 70 |also use|d to exp|
|00000ba0| 6f 72 74 20 63 6c 69 70 | 20 61 72 74 2e 20 45 6e |ort clip| art. En|
|00000bb0| 63 61 70 73 75 6c 61 74 | 65 64 20 50 6f 73 74 53 |capsulat|ed PostS|
|00000bc0| 63 72 69 70 74 20 28 45 | 50 53 29 20 66 69 6c 65 |cript (E|PS) file|
|00000bd0| 73 20 61 72 65 20 77 69 | 64 65 6c 79 20 75 73 65 |s are wi|dely use|
|00000be0| 64 20 66 6f 72 20 65 78 | 70 6f 72 74 69 6e 67 20 |d for ex|porting |
|00000bf0| 61 6e 64 20 69 6d 70 6f | 72 74 69 6e 67 20 61 72 |and impo|rting ar|
|00000c00| 74 77 6f 72 6b 20 69 6e | 74 6f 20 64 6f 63 75 6d |twork in|to docum|
|00000c10| 65 6e 74 73 2e 0d 42 75 | 74 20 74 68 65 20 6d 6f |ents..Bu|t the mo|
|00000c20| 73 74 20 69 6d 70 6f 72 | 74 61 6e 74 20 61 74 74 |st impor|tant att|
|00000c30| 72 69 62 75 74 65 20 6f | 66 20 74 68 65 20 50 6f |ribute o|f the Po|
|00000c40| 73 74 53 63 72 69 70 74 | 20 6c 61 6e 67 75 61 67 |stScript| languag|
|00000c50| 65 20 69 73 20 74 68 61 | 74 2c 20 6d 6f 72 65 20 |e is tha|t, more |
|00000c60| 74 68 61 6e 20 61 20 67 | 72 61 70 68 69 63 73 20 |than a g|raphics |
|00000c70| 6d 6f 64 65 6c 2c 20 69 | 74 d5 73 20 61 20 70 72 |model, i|t.s a pr|
|00000c80| 6f 67 72 61 6d 6d 69 6e | 67 20 6c 61 6e 67 75 61 |ogrammin|g langua|
|00000c90| 67 65 20 77 69 74 68 20 | 6d 6f 73 74 20 6f 66 20 |ge with |most of |
|00000ca0| 74 68 65 20 63 6f 6e 73 | 74 72 75 63 74 73 20 6f |the cons|tructs o|
|00000cb0| 66 20 6d 6f 64 65 72 6e | 20 68 69 67 68 2d 6c 65 |f modern| high-le|
|00000cc0| 76 65 6c 20 6c 61 6e 67 | 75 61 67 65 73 2e 20 54 |vel lang|uages. T|
|00000cd0| 68 65 20 50 6f 73 74 53 | 63 72 69 70 74 20 6c 61 |he PostS|cript la|
|00000ce0| 6e 67 75 61 67 65 20 69 | 73 20 72 65 61 6c 6c 79 |nguage i|s really|
|00000cf0| 20 61 20 77 72 61 70 70 | 65 72 20 66 6f 72 20 74 | a wrapp|er for t|
|00000d00| 68 65 20 50 6f 73 74 53 | 63 72 69 70 74 20 67 72 |he PostS|cript gr|
|00000d10| 61 70 68 69 63 73 20 6d | 6f 64 65 6c 2e 20 54 68 |aphics m|odel. Th|
|00000d20| 65 20 67 72 61 70 68 69 | 63 73 20 61 72 65 20 69 |e graphi|cs are i|
|00000d30| 6e 76 6f 6b 65 64 20 62 | 79 20 6f 70 65 72 61 74 |nvoked b|y operat|
|00000d40| 6f 72 73 20 69 6e 20 74 | 68 65 20 6c 61 6e 67 75 |ors in t|he langu|
|00000d50| 61 67 65 2e 20 54 68 69 | 73 20 66 75 6c 6c 20 70 |age. Thi|s full p|
|00000d60| 72 6f 67 72 61 6d 6d 61 | 62 69 6c 69 74 79 20 6d |rogramma|bility m|
|00000d70| 61 6b 65 73 20 69 74 20 | 65 61 73 79 20 66 6f 72 |akes it |easy for|
|00000d80| 20 70 72 6f 67 72 61 6d | 6d 65 72 73 20 74 6f 20 | program|mers to |
|00000d90| 65 78 74 65 6e 64 20 74 | 68 65 20 50 6f 73 74 53 |extend t|he PostS|
|00000da0| 63 72 69 70 74 20 6d 6f | 64 65 6c 20 74 6f 20 6d |cript mo|del to m|
|00000db0| 65 65 74 20 74 68 65 69 | 72 20 6e 65 65 64 73 2e |eet thei|r needs.|
|00000dc0| 20 49 66 20 61 20 64 65 | 73 69 72 65 64 20 66 65 | If a de|sired fe|
|00000dd0| 61 74 75 72 65 20 69 73 | 6e d5 74 20 69 6e 20 74 |ature is|n.t in t|
|00000de0| 68 65 20 50 6f 73 74 53 | 63 72 69 70 74 20 67 72 |he PostS|cript gr|
|00000df0| 61 70 68 69 63 73 20 6d | 6f 64 65 6c 2c 20 69 74 |aphics m|odel, it|
|00000e00| 20 63 61 6e 20 66 72 65 | 71 75 65 6e 74 6c 79 20 | can fre|quently |
|00000e10| 62 65 20 70 72 6f 67 72 | 61 6d 6d 65 64 20 69 6e |be progr|ammed in|
|00000e20| 20 74 68 65 20 50 6f 73 | 74 53 63 72 69 70 74 20 | the Pos|tScript |
|00000e30| 6c 61 6e 67 75 61 67 65 | 2e 20 46 6f 72 20 65 78 |language|. For ex|
|00000e40| 61 6d 70 6c 65 2c 20 50 | 6f 73 74 53 63 72 69 70 |ample, P|ostScrip|
|00000e50| 74 20 4c 65 76 65 6c 20 | 31 20 64 6f 65 73 6e d5 |t Level |1 doesn.|
|00000e60| 74 20 63 6f 6e 74 61 69 | 6e 20 70 61 74 74 65 72 |t contai|n patter|
|00000e70| 6e 73 2c 20 62 75 74 20 | 61 20 50 6f 73 74 53 63 |ns, but |a PostSc|
|00000e80| 72 69 70 74 20 70 72 6f | 63 65 64 75 72 65 20 63 |ript pro|cedure c|
|00000e90| 61 6e 20 62 65 20 77 72 | 69 74 74 65 6e 20 74 6f |an be wr|itten to|
|00000ea0| 20 66 69 6c 6c 20 61 20 | 50 6f 73 74 53 63 72 69 | fill a |PostScri|
|00000eb0| 70 74 20 70 61 74 68 20 | 77 69 74 68 20 61 20 70 |pt path |with a p|
|00000ec0| 61 74 74 65 72 6e 2e 20 | 0d 44 75 65 20 74 6f 20 |attern. |.Due to |
|00000ed0| 74 68 69 73 20 70 72 6f | 67 72 61 6d 6d 61 62 69 |this pro|grammabi|
|00000ee0| 6c 69 74 79 2c 20 69 74 | d5 73 20 70 6f 73 73 69 |lity, it|.s possi|
|00000ef0| 62 6c 65 20 74 6f 20 65 | 6d 75 6c 61 74 65 20 64 |ble to e|mulate d|
|00000f00| 69 72 65 63 74 6c 79 20 | 6f 6e 20 50 6f 73 74 53 |irectly |on PostS|
|00000f10| 63 72 69 70 74 20 70 72 | 69 6e 74 65 72 73 20 6d |cript pr|inters m|
|00000f20| 61 6e 79 20 6f 66 20 74 | 68 65 20 51 75 69 63 6b |any of t|he Quick|
|00000f30| 44 72 61 77 20 47 58 20 | 66 65 61 74 75 72 65 73 |Draw GX |features|
|00000f40| 20 74 68 61 74 20 61 72 | 65 6e d5 74 20 70 72 65 | that ar|en.t pre|
|00000f50| 73 65 6e 74 20 69 6e 20 | 74 68 65 20 50 6f 73 74 |sent in |the Post|
|00000f60| 53 63 72 69 70 74 20 67 | 72 61 70 68 69 63 73 20 |Script g|raphics |
|00000f70| 6d 6f 64 65 6c 2e 20 57 | 68 65 6e 20 51 75 69 63 |model. W|hen Quic|
|00000f80| 6b 44 72 61 77 20 47 58 | 20 67 65 6e 65 72 61 74 |kDraw GX| generat|
|00000f90| 65 73 20 61 20 50 6f 73 | 74 53 63 72 69 70 74 20 |es a Pos|tScript |
|00000fa0| 73 74 72 65 61 6d 2c 20 | 69 74 20 69 6e 63 6c 75 |stream, |it inclu|
|00000fb0| 64 65 73 20 61 20 63 6f | 6d 70 6c 65 78 20 73 65 |des a co|mplex se|
|00000fc0| 74 20 6f 66 20 50 6f 73 | 74 53 63 72 69 70 74 20 |t of Pos|tScript |
|00000fd0| 70 72 6f 63 65 64 75 72 | 65 73 20 74 6f 20 64 6f |procedur|es to do|
|00000fe0| 20 73 6f 2e 0d 43 4f 4d | 50 41 52 49 4e 47 20 51 | so..COM|PARING Q|
|00000ff0| 55 49 43 4b 44 52 41 57 | 20 47 58 20 41 4e 44 20 |UICKDRAW| GX AND |
|00001000| 50 4f 53 54 53 43 52 49 | 50 54 0d 54 68 69 73 20 |POSTSCRI|PT.This |
|00001010| 73 65 63 74 69 6f 6e 20 | 63 6f 6d 70 61 72 65 73 |section |compares|
|00001020| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 61 6e | QuickDr|aw GX an|
|00001030| 64 20 74 68 65 20 50 6f | 73 74 53 63 72 69 70 74 |d the Po|stScript|
|00001040| 20 6c 61 6e 67 75 61 67 | 65 20 69 6e 20 74 65 72 | languag|e in ter|
|00001050| 6d 73 20 6f 66 20 74 68 | 65 69 72 20 67 72 61 70 |ms of th|eir grap|
|00001060| 68 69 63 73 2c 20 74 65 | 78 74 2d 64 72 61 77 69 |hics, te|xt-drawi|
|00001070| 6e 67 2c 20 70 72 69 6e | 74 69 6e 67 2c 20 61 6e |ng, prin|ting, an|
|00001080| 64 20 70 72 6f 67 72 61 | 6d 6d 69 6e 67 20 6d 6f |d progra|mming mo|
|00001090| 64 65 6c 73 2e 0d 54 48 | 45 20 47 52 41 50 48 49 |dels..TH|E GRAPHI|
|000010a0| 43 53 20 4d 4f 44 45 4c | 0d 53 6f 6d 65 20 64 69 |CS MODEL|.Some di|
|000010b0| 66 66 65 72 65 6e 63 65 | 73 20 62 65 74 77 65 65 |fference|s betwee|
|000010c0| 6e 20 74 68 65 20 51 75 | 69 63 6b 44 72 61 77 20 |n the Qu|ickDraw |
|000010d0| 47 58 20 61 6e 64 20 50 | 6f 73 74 53 63 72 69 70 |GX and P|ostScrip|
|000010e0| 74 20 67 72 61 70 68 69 | 63 73 20 6d 6f 64 65 6c |t graphi|cs model|
|000010f0| 73 20 69 6e 63 6c 75 64 | 65 20 6d 61 74 68 20 74 |s includ|e math t|
|00001100| 79 70 65 73 2c 20 42 8e | 7a 69 65 72 20 63 75 72 |ypes, B.|zier cur|
|00001110| 76 65 73 2c 20 6d 61 74 | 72 69 78 20 74 72 61 6e |ves, mat|rix tran|
|00001120| 73 66 6f 72 6d 61 74 69 | 6f 6e 2c 20 61 6e 64 20 |sformati|on, and |
|00001130| 6f 72 69 65 6e 74 61 74 | 69 6f 6e 20 6f 66 20 74 |orientat|ion of t|
|00001140| 68 65 20 0d 79 2d 61 78 | 69 73 2e 0d 4d 61 74 68 |he .y-ax|is..Math|
|00001150| 20 74 79 70 65 73 2e 20 | 42 65 66 6f 72 65 20 65 | types. |Before e|
|00001160| 6e 74 65 72 69 6e 67 20 | 74 68 65 20 77 6f 72 6c |ntering |the worl|
|00001170| 64 20 6f 66 20 51 75 69 | 63 6b 44 72 61 77 20 47 |d of Qui|ckDraw G|
|00001180| 58 20 70 72 6f 67 72 61 | 6d 6d 69 6e 67 2c 20 61 |X progra|mming, a|
|00001190| 20 50 6f 73 74 53 63 72 | 69 70 74 20 70 72 6f 67 | PostScr|ipt prog|
|000011a0| 72 61 6d 6d 65 72 20 6d | 75 73 74 20 75 6e 64 65 |rammer m|ust unde|
|000011b0| 72 73 74 61 6e 64 20 74 | 68 65 20 62 61 73 69 63 |rstand t|he basic|
|000011c0| 20 64 69 66 66 65 72 65 | 6e 63 65 73 20 69 6e 20 | differe|nces in |
|000011d0| 68 6f 77 20 6e 75 6d 62 | 65 72 73 20 61 72 65 20 |how numb|ers are |
|000011e0| 72 65 70 72 65 73 65 6e | 74 65 64 20 62 79 20 51 |represen|ted by Q|
|000011f0| 75 69 63 6b 44 72 61 77 | 20 47 58 20 61 6e 64 20 |uickDraw| GX and |
|00001200| 74 68 65 20 50 6f 73 74 | 53 63 72 69 70 74 20 6c |the Post|Script l|
|00001210| 61 6e 67 75 61 67 65 2e | 0d 54 68 65 20 50 6f 73 |anguage.|.The Pos|
|00001220| 74 53 63 72 69 70 74 20 | 6c 61 6e 67 75 61 67 65 |tScript |language|
|00001230| 20 75 73 65 73 20 66 6c | 6f 61 74 69 6e 67 2d 70 | uses fl|oating-p|
|00001240| 6f 69 6e 74 20 6e 75 6d | 62 65 72 73 20 61 6e 64 |oint num|bers and|
|00001250| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 75 73 | QuickDr|aw GX us|
|00001260| 65 73 20 66 69 78 65 64 | 2d 70 6f 69 6e 74 20 6e |es fixed|-point n|
|00001270| 75 6d 62 65 72 73 2e 20 | 54 68 65 20 61 64 76 61 |umbers. |The adva|
|00001280| 6e 74 61 67 65 20 74 6f | 20 66 6c 6f 61 74 69 6e |ntage to| floatin|
|00001290| 67 2d 70 6f 69 6e 74 20 | 6e 75 6d 62 65 72 73 20 |g-point |numbers |
|000012a0| 69 73 20 6e 75 6d 65 72 | 69 63 20 72 61 6e 67 65 |is numer|ic range|
|000012b0| 3b 20 74 68 65 20 61 64 | 76 61 6e 74 61 67 65 20 |; the ad|vantage |
|000012c0| 74 6f 20 66 69 78 65 64 | 2d 70 6f 69 6e 74 20 6e |to fixed|-point n|
|000012d0| 75 6d 62 65 72 73 20 69 | 73 20 73 70 65 65 64 2e |umbers i|s speed.|
|000012e0| 20 57 69 74 68 20 66 69 | 78 65 64 2d 70 6f 69 6e | With fi|xed-poin|
|000012f0| 74 20 6e 75 6d 62 65 72 | 73 2c 20 61 64 64 69 74 |t number|s, addit|
|00001300| 69 6f 6e 20 61 6e 64 20 | 73 75 62 74 72 61 63 74 |ion and |subtract|
|00001310| 69 6f 6e 20 61 72 65 20 | 6e 6f 20 73 6c 6f 77 65 |ion are |no slowe|
|00001320| 72 20 74 68 61 6e 20 77 | 69 74 68 20 72 65 67 75 |r than w|ith regu|
|00001330| 6c 61 72 20 69 6e 74 65 | 67 65 72 73 2e 20 51 75 |lar inte|gers. Qu|
|00001340| 69 63 6b 44 72 61 77 20 | 47 58 20 75 73 65 73 20 |ickDraw |GX uses |
|00001350| 31 36 2e 31 36 20 66 69 | 78 65 64 2d 70 6f 69 6e |16.16 fi|xed-poin|
|00001360| 74 20 6e 75 6d 62 65 72 | 73 20 28 33 32 2d 62 69 |t number|s (32-bi|
|00001370| 74 20 6e 75 6d 62 65 72 | 73 20 77 69 74 68 20 74 |t number|s with t|
|00001380| 68 65 20 68 69 67 68 20 | 31 36 20 62 69 74 73 20 |he high |16 bits |
|00001390| 72 65 70 72 65 73 65 6e | 74 69 6e 67 20 74 68 65 |represen|ting the|
|000013a0| 20 69 6e 74 65 67 65 72 | 20 70 6f 72 74 69 6f 6e | integer| portion|
|000013b0| 20 61 6e 64 20 74 68 65 | 20 6c 6f 77 20 31 36 20 | and the| low 16 |
|000013c0| 62 69 74 73 20 72 65 70 | 72 65 73 65 6e 74 69 6e |bits rep|resentin|
|000013d0| 67 20 74 68 65 20 66 72 | 61 63 74 69 6f 6e 61 6c |g the fr|actional|
|000013e0| 20 70 6f 72 74 69 6f 6e | 29 2e 20 0d 49 6e 20 74 | portion|). .In t|
|000013f0| 68 65 20 50 6f 73 74 53 | 63 72 69 70 74 20 6c 61 |he PostS|cript la|
|00001400| 6e 67 75 61 67 65 2c 20 | 63 6f 6c 6f 72 20 63 6f |nguage, |color co|
|00001410| 6d 70 6f 6e 65 6e 74 20 | 76 61 6c 75 65 73 20 61 |mponent |values a|
|00001420| 72 65 20 72 65 70 72 65 | 73 65 6e 74 65 64 20 62 |re repre|sented b|
|00001430| 79 20 66 6c 6f 61 74 69 | 6e 67 2d 70 6f 69 6e 74 |y floati|ng-point|
|00001440| 20 6e 75 6d 62 65 72 73 | 20 62 65 74 77 65 65 6e | numbers| between|
|00001450| 20 30 2e 30 20 61 6e 64 | 20 31 2e 30 2e 20 49 6e | 0.0 and| 1.0. In|
|00001460| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 2c 20 63 | QuickDr|aw GX, c|
|00001470| 6f 6c 6f 72 20 63 6f 6d | 70 6f 6e 65 6e 74 20 76 |olor com|ponent v|
|00001480| 61 6c 75 65 73 20 61 72 | 65 20 72 65 70 72 65 73 |alues ar|e repres|
|00001490| 65 6e 74 65 64 20 62 79 | 20 61 20 74 79 70 65 20 |ented by| a type |
|000014a0| 63 61 6c 6c 65 64 20 63 | 6f 6c 6f 72 56 61 6c 75 |called c|olorValu|
|000014b0| 65 2c 20 77 68 69 63 68 | 20 69 73 20 72 65 61 6c |e, which| is real|
|000014c0| 6c 79 20 61 20 73 68 6f | 72 74 20 73 75 63 68 20 |ly a sho|rt such |
|000014d0| 74 68 61 74 20 30 78 30 | 30 30 30 20 69 73 20 30 |that 0x0|000 is 0|
|000014e0| 2e 30 20 61 6e 64 20 30 | 78 46 46 46 46 20 69 73 |.0 and 0|xFFFF is|
|000014f0| 20 31 2e 30 2e 20 51 75 | 69 63 6b 44 72 61 77 20 | 1.0. Qu|ickDraw |
|00001500| 47 58 20 61 6c 73 6f 20 | 75 73 65 73 20 61 20 74 |GX also |uses a t|
|00001510| 79 70 65 20 63 61 6c 6c | 65 64 20 66 72 61 63 74 |ype call|ed fract|
|00001520| 2e 20 54 68 65 20 66 72 | 61 63 74 20 74 79 70 65 |. The fr|act type|
|00001530| 20 69 73 20 6c 69 6b 65 | 20 74 68 65 20 66 69 78 | is like| the fix|
|00001540| 65 64 20 74 79 70 65 20 | 65 78 63 65 70 74 20 74 |ed type |except t|
|00001550| 68 61 74 20 6f 6e 6c 79 | 20 74 68 65 20 68 69 67 |hat only| the hig|
|00001560| 68 20 74 77 6f 20 62 69 | 74 73 20 61 72 65 20 74 |h two bi|ts are t|
|00001570| 68 65 20 69 6e 74 65 67 | 65 72 20 70 6f 72 74 69 |he integ|er porti|
|00001580| 6f 6e 20 61 6e 64 20 74 | 68 65 20 6c 6f 77 20 33 |on and t|he low 3|
|00001590| 30 20 62 69 74 73 20 61 | 72 65 20 74 68 65 20 66 |0 bits a|re the f|
|000015a0| 72 61 63 74 69 6f 6e 61 | 6c 20 70 6f 72 74 69 6f |ractiona|l portio|
|000015b0| 6e 2e 20 54 68 69 73 20 | 69 73 20 67 65 6e 65 72 |n. This |is gener|
|000015c0| 61 6c 6c 79 20 75 73 65 | 64 20 66 6f 72 20 6e 75 |ally use|d for nu|
|000015d0| 6d 62 65 72 73 20 62 65 | 74 77 65 65 6e 20 2d 31 |mbers be|tween -1|
|000015e0| 20 61 6e 64 20 31 20 77 | 68 65 72 65 20 66 72 61 | and 1 w|here fra|
|000015f0| 63 74 69 6f 6e 61 6c 20 | 70 72 65 63 69 73 69 6f |ctional |precisio|
|00001600| 6e 20 69 73 20 69 6d 70 | 6f 72 74 61 6e 74 2e 0d |n is imp|ortant..|
|00001610| 43 75 72 76 65 73 2e 20 | 42 6f 74 68 20 51 75 69 |Curves. |Both Qui|
|00001620| 63 6b 44 72 61 77 20 47 | 58 20 61 6e 64 20 74 68 |ckDraw G|X and th|
|00001630| 65 20 50 6f 73 74 53 63 | 72 69 70 74 20 6c 61 6e |e PostSc|ript lan|
|00001640| 67 75 61 67 65 20 73 75 | 70 70 6f 72 74 20 42 8e |guage su|pport B.|
|00001650| 7a 69 65 72 20 63 75 72 | 76 65 73 2e 20 48 6f 77 |zier cur|ves. How|
|00001660| 65 76 65 72 2c 20 65 61 | 63 68 20 73 75 70 70 6f |ever, ea|ch suppo|
|00001670| 72 74 73 20 61 20 64 69 | 66 66 65 72 65 6e 74 20 |rts a di|fferent |
|00001680| 6b 69 6e 64 20 28 73 65 | 65 20 46 69 67 75 72 65 |kind (se|e Figure|
|00001690| 20 31 29 2e 20 57 68 69 | 6c 65 20 74 68 65 20 50 | 1). Whi|le the P|
|000016a0| 6f 73 74 53 63 72 69 70 | 74 20 6c 61 6e 67 75 61 |ostScrip|t langua|
|000016b0| 67 65 20 75 73 65 73 20 | 63 75 62 69 63 73 2c 20 |ge uses |cubics, |
|000016c0| 47 58 20 75 73 65 73 20 | 71 75 61 64 72 61 74 69 |GX uses |quadrati|
|000016d0| 63 73 2e 20 41 20 63 75 | 62 69 63 20 42 8e 7a 69 |cs. A cu|bic B.zi|
|000016e0| 65 72 20 63 75 72 76 65 | 20 73 65 67 6d 65 6e 74 |er curve| segment|
|000016f0| 20 69 73 20 64 65 66 69 | 6e 65 64 20 62 79 20 66 | is defi|ned by f|
|00001700| 6f 75 72 20 63 6f 6e 74 | 72 6f 6c 20 70 6f 69 6e |our cont|rol poin|
|00001710| 74 73 3a 20 61 20 73 74 | 61 72 74 69 6e 67 20 70 |ts: a st|arting p|
|00001720| 6f 69 6e 74 20 6f 6e 20 | 74 68 65 20 63 75 72 76 |oint on |the curv|
|00001730| 65 2c 20 74 77 6f 20 70 | 6f 69 6e 74 73 20 6f 66 |e, two p|oints of|
|00001740| 66 20 74 68 65 20 63 75 | 72 76 65 2c 20 61 6e 64 |f the cu|rve, and|
|00001750| 20 61 6e 20 65 6e 64 69 | 6e 67 20 70 6f 69 6e 74 | an endi|ng point|
|00001760| 20 6f 6e 20 74 68 65 20 | 63 75 72 76 65 2e 20 41 | on the |curve. A|
|00001770| 20 71 75 61 64 72 61 74 | 69 63 20 42 8e 7a 69 65 | quadrat|ic B.zie|
|00001780| 72 20 63 75 72 76 65 20 | 69 73 20 64 65 66 69 6e |r curve |is defin|
|00001790| 65 64 20 62 79 20 74 68 | 72 65 65 20 63 6f 6e 74 |ed by th|ree cont|
|000017a0| 72 6f 6c 20 70 6f 69 6e | 74 73 3a 20 61 20 73 74 |rol poin|ts: a st|
|000017b0| 61 72 74 69 6e 67 20 70 | 6f 69 6e 74 20 6f 6e 20 |arting p|oint on |
|000017c0| 74 68 65 20 63 75 72 76 | 65 2c 20 61 20 63 6f 6e |the curv|e, a con|
|000017d0| 74 72 6f 6c 20 70 6f 69 | 6e 74 20 6f 66 66 20 74 |trol poi|nt off t|
|000017e0| 68 65 20 63 75 72 76 65 | 2c 20 61 6e 64 20 61 6e |he curve|, and an|
|000017f0| 20 65 6e 64 69 6e 67 20 | 70 6f 69 6e 74 20 6f 6e | ending |point on|
|00001800| 20 74 68 65 20 63 75 72 | 76 65 2e 0d 46 69 67 75 | the cur|ve..Figu|
|00001810| 72 65 20 31 0d 43 6f 6d | 70 61 72 69 6e 67 20 43 |re 1.Com|paring C|
|00001820| 6f 6e 74 72 6f 6c 20 50 | 6f 69 6e 74 73 20 6f 6e |ontrol P|oints on|
|00001830| 20 42 8e 7a 69 65 72 20 | 43 75 72 76 65 73 0d 46 | B.zier |Curves.F|
|00001840| 69 67 75 72 65 20 32 20 | 69 6c 6c 75 73 74 72 61 |igure 2 |illustra|
|00001850| 74 65 73 20 74 77 6f 20 | 73 69 6d 69 6c 61 72 6c |tes two |similarl|
|00001860| 79 20 73 68 61 70 65 64 | 20 70 61 74 68 73 2e 20 |y shaped| paths. |
|00001870| 54 68 65 20 6f 6e 65 20 | 6f 6e 20 74 68 65 20 6c |The one |on the l|
|00001880| 65 66 74 20 69 73 20 64 | 65 66 69 6e 65 64 20 62 |eft is d|efined b|
|00001890| 79 20 74 77 6f 20 71 75 | 61 64 72 61 74 69 63 20 |y two qu|adratic |
|000018a0| 73 65 67 6d 65 6e 74 73 | 2c 20 72 65 71 75 69 72 |segments|, requir|
|000018b0| 69 6e 67 20 66 69 76 65 | 20 63 6f 6e 74 72 6f 6c |ing five| control|
|000018c0| 20 70 6f 69 6e 74 73 2e | 20 54 68 65 20 6f 6e 65 | points.| The one|
|000018d0| 20 6f 6e 20 74 68 65 20 | 72 69 67 68 74 20 69 73 | on the |right is|
|000018e0| 20 64 65 66 69 6e 65 64 | 20 62 79 20 61 20 73 69 | defined| by a si|
|000018f0| 6e 67 6c 65 20 63 75 62 | 69 63 20 73 65 67 6d 65 |ngle cub|ic segme|
|00001900| 6e 74 2c 20 72 65 71 75 | 69 72 69 6e 67 20 66 6f |nt, requ|iring fo|
|00001910| 75 72 20 63 6f 6e 74 72 | 6f 6c 20 70 6f 69 6e 74 |ur contr|ol point|
|00001920| 73 2e 20 54 68 69 73 20 | 73 65 65 6d 73 20 74 6f |s. This |seems to|
|00001930| 20 69 6d 70 6c 79 20 74 | 68 61 74 20 69 6e 20 64 | imply t|hat in d|
|00001940| 72 61 77 69 6e 67 20 73 | 69 6d 69 6c 61 72 20 73 |rawing s|imilar s|
|00001950| 68 61 70 65 73 2c 20 6d | 6f 72 65 20 70 6f 69 6e |hapes, m|ore poin|
|00001960| 74 73 20 61 72 65 20 72 | 65 71 75 69 72 65 64 20 |ts are r|equired |
|00001970| 75 73 69 6e 67 20 71 75 | 61 64 72 61 74 69 63 73 |using qu|adratics|
|00001980| 20 74 68 61 6e 20 75 73 | 69 6e 67 20 63 75 62 69 | than us|ing cubi|
|00001990| 63 73 20 61 6e 64 20 74 | 68 61 74 2c 20 74 68 65 |cs and t|hat, the|
|000019a0| 72 65 66 6f 72 65 2c 20 | 71 75 61 64 72 61 74 69 |refore, |quadrati|
|000019b0| 63 73 20 61 72 65 20 61 | 74 20 61 20 64 69 73 61 |cs are a|t a disa|
|000019c0| 64 76 61 6e 74 61 67 65 | 2e 20 48 6f 77 65 76 65 |dvantage|. Howeve|
|000019d0| 72 2c 20 74 6f 20 72 65 | 64 75 63 65 20 64 61 74 |r, to re|duce dat|
|000019e0| 61 20 73 69 7a 65 2c 20 | 74 68 65 20 64 61 74 61 |a size, |the data|
|000019f0| 20 73 74 72 75 63 74 75 | 72 65 20 66 6f 72 20 61 | structu|re for a|
|00001a00| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 70 61 | QuickDr|aw GX pa|
|00001a10| 74 68 20 61 6c 6c 6f 77 | 73 20 69 6d 70 6c 69 65 |th allow|s implie|
|00001a20| 64 20 70 6f 69 6e 74 73 | 2e 20 45 61 63 68 20 70 |d points|. Each p|
|00001a30| 6f 69 6e 74 20 69 6e 20 | 74 68 65 20 0d 51 75 69 |oint in |the .Qui|
|00001a40| 63 6b 44 72 61 77 20 47 | 58 20 70 61 74 68 20 68 |ckDraw G|X path h|
|00001a50| 61 73 20 61 20 63 6f 6e | 74 72 6f 6c 20 62 69 74 |as a con|trol bit|
|00001a60| 2c 20 69 6e 64 69 63 61 | 74 69 6e 67 20 77 68 65 |, indica|ting whe|
|00001a70| 74 68 65 72 20 74 68 65 | 20 70 6f 69 6e 74 20 69 |ther the| point i|
|00001a80| 73 20 6f 6e 20 6f 72 20 | 6f 66 66 20 74 68 65 20 |s on or |off the |
|00001a90| 63 75 72 76 65 2e 20 49 | 66 20 74 77 6f 20 63 6f |curve. I|f two co|
|00001aa0| 6e 73 65 63 75 74 69 76 | 65 20 70 6f 69 6e 74 73 |nsecutiv|e points|
|00001ab0| 20 69 6e 20 74 68 65 20 | 70 61 74 68 20 61 72 65 | in the |path are|
|00001ac0| 20 6f 66 66 20 74 68 65 | 20 63 75 72 76 65 2c 20 | off the| curve, |
|00001ad0| 74 68 65 72 65 d5 73 20 | 61 6e 20 69 6d 70 6c 69 |there.s |an impli|
|00001ae0| 65 64 20 70 6f 69 6e 74 | 20 68 61 6c 66 77 61 79 |ed point| halfway|
|00001af0| 20 62 65 74 77 65 65 6e | 20 74 68 65 20 74 77 6f | between| the two|
|00001b00| 20 65 78 70 6c 69 63 69 | 74 6c 79 20 73 70 65 63 | explici|tly spec|
|00001b10| 69 66 69 65 64 20 70 6f | 69 6e 74 73 2e 20 53 6f |ified po|ints. So|
|00001b20| 2c 20 61 73 20 73 68 6f | 77 6e 20 69 6e 20 46 69 |, as sho|wn in Fi|
|00001b30| 67 75 72 65 20 32 2c 20 | 69 74 d5 73 20 6f 6e 6c |gure 2, |it.s onl|
|00001b40| 79 20 6e 65 63 65 73 73 | 61 72 79 20 74 6f 20 73 |y necess|ary to s|
|00001b50| 75 70 70 6c 79 20 66 6f | 75 72 20 70 6f 69 6e 74 |upply fo|ur point|
|00001b60| 73 20 66 6f 72 20 74 68 | 65 20 71 75 61 64 72 61 |s for th|e quadra|
|00001b70| 74 69 63 20 70 61 74 68 | 2c 20 61 73 20 74 68 65 |tic path|, as the|
|00001b80| 20 70 6f 69 6e 74 20 62 | 65 74 77 65 65 6e 20 70 | point b|etween p|
|00001b90| 6f 69 6e 74 20 32 20 61 | 6e 64 20 70 6f 69 6e 74 |oint 2 a|nd point|
|00001ba0| 20 33 20 69 73 20 69 6d | 70 6c 69 63 69 74 2e 0d | 3 is im|plicit..|
|00001bb0| 46 69 67 75 72 65 20 32 | 0d 43 6f 6e 74 72 6f 6c |Figure 2|.Control|
|00001bc0| 20 50 6f 69 6e 74 73 20 | 66 6f 72 20 50 61 74 68 | Points |for Path|
|00001bd0| 73 0d 4d 61 74 72 69 78 | 20 74 72 61 6e 73 66 6f |s.Matrix| transfo|
|00001be0| 72 6d 61 74 69 6f 6e 73 | 2e 20 42 6f 74 68 20 51 |rmations|. Both Q|
|00001bf0| 75 69 63 6b 44 72 61 77 | 20 47 58 20 61 6e 64 20 |uickDraw| GX and |
|00001c00| 74 68 65 20 50 6f 73 74 | 53 63 72 69 70 74 20 6c |the Post|Script l|
|00001c10| 61 6e 67 75 61 67 65 20 | 61 6c 6c 6f 77 20 61 6e |anguage |allow an|
|00001c20| 79 74 68 69 6e 67 20 74 | 6f 20 62 65 20 74 72 61 |ything t|o be tra|
|00001c30| 6e 73 66 6f 72 6d 65 64 | 20 74 68 72 6f 75 67 68 |nsformed| through|
|00001c40| 20 61 20 6d 61 74 72 69 | 78 20 62 65 66 6f 72 65 | a matri|x before|
|00001c50| 20 62 65 69 6e 67 20 64 | 72 61 77 6e 2e 20 42 6f | being d|rawn. Bo|
|00001c60| 74 68 20 75 73 65 20 61 | 20 33 20 78 20 33 20 74 |th use a| 3 x 3 t|
|00001c70| 72 61 6e 73 66 6f 72 6d | 61 74 69 6f 6e 20 6d 61 |ransform|ation ma|
|00001c80| 74 72 69 78 2e 20 48 6f | 77 65 76 65 72 2c 20 69 |trix. Ho|wever, i|
|00001c90| 6e 20 74 68 65 20 50 6f | 73 74 53 63 72 69 70 74 |n the Po|stScript|
|00001ca0| 20 6c 61 6e 67 75 61 67 | 65 20 74 68 65 20 6d 61 | languag|e the ma|
|00001cb0| 74 72 69 78 20 68 61 73 | 20 69 6d 70 6c 69 63 69 |trix has| implici|
|00001cc0| 74 20 63 6f 6e 73 74 61 | 6e 74 20 76 61 6c 75 65 |t consta|nt value|
|00001cd0| 73 20 69 6e 20 74 68 65 | 20 6c 61 73 74 20 63 6f |s in the| last co|
|00001ce0| 6c 75 6d 6e 2c 20 73 6f | 20 74 68 65 72 65 20 61 |lumn, so| there a|
|00001cf0| 72 65 20 6f 6e 6c 79 20 | 73 69 78 20 64 65 67 72 |re only |six degr|
|00001d00| 65 65 73 20 6f 66 20 66 | 72 65 65 64 6f 6d 20 72 |ees of f|reedom r|
|00001d10| 61 74 68 65 72 20 74 68 | 61 6e 20 6e 69 6e 65 2e |ather th|an nine.|
|00001d20| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 61 6c | QuickDr|aw GX al|
|00001d30| 6c 6f 77 73 20 79 6f 75 | 20 74 6f 20 73 70 65 63 |lows you| to spec|
|00001d40| 69 66 79 20 61 6c 6c 20 | 6e 69 6e 65 20 65 6c 65 |ify all |nine ele|
|00001d50| 6d 65 6e 74 73 20 6f 66 | 20 74 68 65 20 6d 61 74 |ments of| the mat|
|00001d60| 72 69 78 2e 0d 54 6f 20 | 6d 6f 64 69 66 79 20 74 |rix..To |modify t|
|00001d70| 68 65 20 63 75 72 72 65 | 6e 74 20 74 72 61 6e 73 |he curre|nt trans|
|00001d80| 66 6f 72 6d 61 74 69 6f | 6e 20 6d 61 74 72 69 78 |formatio|n matrix|
|00001d90| 20 28 43 54 4d 29 20 62 | 79 20 61 20 67 69 76 65 | (CTM) b|y a give|
|00001da0| 6e 20 74 72 61 6e 73 66 | 6f 72 6d 61 74 69 6f 6e |n transf|ormation|
|00001db0| 2c 20 61 6e 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |, an app|lication|
|00001dc0| 20 6d 61 79 20 75 73 65 | 20 74 68 65 20 66 6f 6c | may use| the fol|
|00001dd0| 6c 6f 77 69 6e 67 20 50 | 6f 73 74 53 63 72 69 70 |lowing P|ostScrip|
|00001de0| 74 20 63 6f 64 65 3a 0d | 5b 20 34 2e 31 37 20 30 |t code:.|[ 4.17 0|
|00001df0| 2e 30 20 30 2e 30 20 2d | 34 2e 31 37 20 2d 31 32 |.0 0.0 -|4.17 -12|
|00001e00| 38 30 2e 30 20 31 36 35 | 30 2e 35 20 5d 20 63 6f |80.0 165|0.5 ] co|
|00001e10| 6e 63 61 74 0d 54 68 69 | 73 20 63 6f 64 65 20 63 |ncat.Thi|s code c|
|00001e20| 6f 6e 63 61 74 65 6e 61 | 74 65 73 20 74 68 65 20 |oncatena|tes the |
|00001e30| 66 6f 6c 6c 6f 77 69 6e | 67 20 6d 61 74 72 69 78 |followin|g matrix|
|00001e40| 20 77 69 74 68 20 74 68 | 65 20 43 54 4d 20 69 6e | with th|e CTM in|
|00001e50| 20 74 68 65 20 67 72 61 | 70 68 69 63 73 20 73 74 | the gra|phics st|
|00001e60| 61 74 65 3a 0d 34 2e 31 | 37 20 2c 20 20 30 2e 30 |ate:.4.1|7 , 0.0|
|00001e70| 20 2c 20 20 30 2e 30 20 | 2c 20 20 30 2e 30 2c 20 | , 0.0 |, 0.0, |
|00001e80| 20 20 2d 34 2e 31 37 2c | 20 20 20 30 2e 30 2c 20 | -4.17,| 0.0, |
|00001e90| 20 20 2d 31 32 38 30 2e | 30 2c 20 20 20 20 31 36 | -1280.|0, 16|
|00001ea0| 35 30 2e 35 2c 20 20 20 | 31 2e 30 20 29 29 0d 51 |50.5, |1.0 )).Q|
|00001eb0| 75 69 63 6b 44 72 61 77 | 20 47 58 20 68 61 73 20 |uickDraw| GX has |
|00001ec0| 61 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |a data s|tructure|
|00001ed0| 20 63 61 6c 6c 65 64 20 | 67 78 4d 61 70 70 69 6e | called |gxMappin|
|00001ee0| 67 2c 20 77 68 69 63 68 | 20 69 73 20 61 20 73 74 |g, which| is a st|
|00001ef0| 72 75 63 74 75 72 65 20 | 63 6f 6e 74 61 69 6e 69 |ructure |containi|
|00001f00| 6e 67 20 6f 6e 65 20 66 | 69 65 6c 64 2e 20 54 68 |ng one f|ield. Th|
|00001f10| 65 20 66 69 65 6c 64 20 | 69 73 20 61 20 33 20 78 |e field |is a 3 x|
|00001f20| 20 33 20 61 72 72 61 79 | 2e 20 54 68 65 20 66 69 | 3 array|. The fi|
|00001f30| 72 73 74 20 74 77 6f 20 | 63 6f 6c 75 6d 6e 73 20 |rst two |columns |
|00001f40| 63 6f 6e 74 61 69 6e 20 | 66 69 78 65 64 2d 70 6f |contain |fixed-po|
|00001f50| 69 6e 74 20 6e 75 6d 62 | 65 72 73 20 61 6e 64 20 |int numb|ers and |
|00001f60| 73 70 65 63 69 66 79 20 | 74 68 65 20 73 6b 65 77 |specify |the skew|
|00001f70| 69 6e 67 2c 20 73 63 61 | 6c 69 6e 67 2c 20 72 6f |ing, sca|ling, ro|
|00001f80| 74 61 74 69 6f 6e 2c 20 | 61 6e 64 20 74 72 61 6e |tation, |and tran|
|00001f90| 73 6c 61 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 74 |slation |of the t|
|00001fa0| 72 61 6e 73 66 6f 72 6d | 61 74 69 6f 6e 2e 20 54 |ransform|ation. T|
|00001fb0| 68 65 20 74 68 69 72 64 | 20 63 6f 6c 75 6d 6e 20 |he third| column |
|00001fc0| 69 73 20 6d 61 64 65 20 | 75 70 20 6f 66 20 66 72 |is made |up of fr|
|00001fd0| 61 63 74 69 6f 6e 61 6c | 20 6e 75 6d 62 65 72 73 |actional| numbers|
|00001fe0| 20 28 6e 75 6d 62 65 72 | 73 20 6f 66 20 74 79 70 | (number|s of typ|
|00001ff0| 65 20 66 72 61 63 74 29 | 20 61 6e 64 20 73 70 65 |e fract)| and spe|
|00002000| 63 69 66 69 65 73 20 74 | 68 65 20 70 65 72 73 70 |cifies t|he persp|
|00002010| 65 63 74 69 76 65 20 70 | 6f 72 74 69 6f 6e 20 6f |ective p|ortion o|
|00002020| 66 20 74 68 65 20 74 72 | 61 6e 73 66 6f 72 6d 61 |f the tr|ansforma|
|00002030| 74 69 6f 6e 2e 20 54 68 | 65 20 66 6f 6c 6c 6f 77 |tion. Th|e follow|
|00002040| 69 6e 67 20 63 6f 64 65 | 20 67 65 6e 65 72 61 74 |ing code| generat|
|00002050| 65 73 20 61 20 6d 61 70 | 70 69 6e 67 20 74 68 61 |es a map|ping tha|
|00002060| 74 d5 73 20 65 71 75 69 | 76 61 6c 65 6e 74 20 74 |t.s equi|valent t|
|00002070| 6f 20 74 68 65 20 6d 61 | 74 72 69 78 20 69 6e 20 |o the ma|trix in |
|00002080| 74 68 65 20 50 6f 73 74 | 53 63 72 69 70 74 20 63 |the Post|Script c|
|00002090| 6f 64 65 3a 0d 2f 2a 20 | 44 65 63 6c 61 72 65 20 |ode:./* |Declare |
|000020a0| 61 20 6d 61 70 70 69 6e | 67 20 73 74 72 75 63 74 |a mappin|g struct|
|000020b0| 75 72 65 20 28 66 72 61 | 63 74 31 20 69 73 20 61 |ure (fra|ct1 is a|
|000020c0| 20 63 6f 6e 73 74 61 6e | 74 20 66 6f 72 20 31 2e | constan|t for 1.|
|000020d0| 30 20 69 6e 0d 20 20 20 | 6d 61 74 68 74 79 70 65 |0 in. |mathtype|
|000020e0| 73 2e 68 29 2e 20 2a 2f | 0d 67 78 4d 61 70 70 69 |s.h). */|.gxMappi|
|000020f0| 6e 67 09 09 61 4d 61 70 | 70 69 6e 67 20 3d 20 20 |ng..aMap|ping = |
|00002100| 20 7b 20 7b 20 66 6c 28 | 34 2e 31 37 29 2c 20 66 | { { fl(|4.17), f|
|00002110| 6c 28 30 2e 30 29 2c 20 | 66 6c 28 30 2e 30 29 20 |l(0.0), |fl(0.0) |
|00002120| 7d 0d 09 09 09 09 09 09 | 09 09 09 20 7b 20 66 6c |}.......|... { fl|
|00002130| 28 30 2e 30 29 2c 20 2d | 66 6c 28 34 2e 31 37 29 |(0.0), -|fl(4.17)|
|00002140| 2c 20 66 6c 28 30 2e 30 | 29 20 7d 0d 09 09 09 09 |, fl(0.0|) }.....|
|00002150| 09 09 09 09 09 20 7b 20 | 2d 66 6c 28 31 32 38 30 |..... { |-fl(1280|
|00002160| 2e 30 29 2c 20 66 6c 28 | 31 36 35 30 2e 35 29 2c |.0), fl(|1650.5),|
|00002170| 66 72 61 63 74 31 20 7d | 20 7d 3b 0d 54 68 65 20 |fract1 }| };.The |
|00002180| 79 2d 61 78 69 73 2e 20 | 54 68 65 20 79 2d 61 78 |y-axis. |The y-ax|
|00002190| 69 73 20 6f 72 69 65 6e | 74 61 74 69 6f 6e 20 64 |is orien|tation d|
|000021a0| 69 66 66 65 72 73 20 69 | 6e 20 74 68 65 20 50 6f |iffers i|n the Po|
|000021b0| 73 74 53 63 72 69 70 74 | 20 67 72 61 70 68 69 63 |stScript| graphic|
|000021c0| 73 20 6d 6f 64 65 6c 20 | 61 6e 64 20 51 75 69 63 |s model |and Quic|
|000021d0| 6b 44 72 61 77 20 47 58 | 2e 20 49 6e 20 74 68 65 |kDraw GX|. In the|
|000021e0| 20 50 6f 73 74 53 63 72 | 69 70 74 20 6d 6f 64 65 | PostScr|ipt mode|
|000021f0| 6c 2c 20 74 68 65 20 79 | 2d 61 78 69 73 20 69 6e |l, the y|-axis in|
|00002200| 63 72 65 61 73 65 73 20 | 66 72 6f 6d 20 74 68 65 |creases |from the|
|00002210| 20 62 6f 74 74 6f 6d 20 | 6f 66 20 74 68 65 20 70 | bottom |of the p|
|00002220| 61 67 65 20 6f 72 20 77 | 69 6e 64 6f 77 20 74 6f |age or w|indow to|
|00002230| 20 74 68 65 20 74 6f 70 | 20 61 6e 64 20 69 6e 20 | the top| and in |
|00002240| 51 75 69 63 6b 44 72 61 | 77 20 47 58 2c 20 61 73 |QuickDra|w GX, as|
|00002250| 20 69 6e 20 51 75 69 63 | 6b 44 72 61 77 2c 20 69 | in Quic|kDraw, i|
|00002260| 74 20 69 6e 63 72 65 61 | 73 65 73 20 66 72 6f 6d |t increa|ses from|
|00002270| 20 74 6f 70 20 74 6f 20 | 62 6f 74 74 6f 6d 20 28 | top to |bottom (|
|00002280| 73 65 65 20 46 69 67 75 | 72 65 20 33 29 2e 0d 46 |see Figu|re 3)..F|
|00002290| 69 67 75 72 65 20 33 0d | 43 6f 6f 72 64 69 6e 61 |igure 3.|Coordina|
|000022a0| 74 65 20 53 79 73 74 65 | 6d 73 0d 4f 42 4a 45 43 |te Syste|ms.OBJEC|
|000022b0| 54 2d 42 41 53 45 44 20 | 4d 4f 44 45 4c 20 56 45 |T-BASED |MODEL VE|
|000022c0| 52 53 55 53 20 53 54 52 | 45 41 4d 2d 42 41 53 45 |RSUS STR|EAM-BASE|
|000022d0| 44 20 50 52 4f 54 4f 43 | 4f 4c 0d 41 20 66 75 6e |D PROTOC|OL.A fun|
|000022e0| 64 61 6d 65 6e 74 61 6c | 20 64 69 66 66 65 72 65 |damental| differe|
|000022f0| 6e 63 65 20 62 65 74 77 | 65 65 6e 20 67 72 61 70 |nce betw|een grap|
|00002300| 68 69 63 73 20 63 6f 64 | 65 20 66 6f 72 20 51 75 |hics cod|e for Qu|
|00002310| 69 63 6b 44 72 61 77 20 | 47 58 20 61 6e 64 20 50 |ickDraw |GX and P|
|00002320| 6f 73 74 53 63 72 69 70 | 74 20 63 6f 64 65 20 69 |ostScrip|t code i|
|00002330| 73 20 74 68 61 74 20 51 | 75 69 63 6b 44 72 61 77 |s that Q|uickDraw|
|00002340| 20 47 58 20 69 73 20 6f | 62 6a 65 63 74 2d 62 61 | GX is o|bject-ba|
|00002350| 73 65 64 20 61 6e 64 20 | 50 6f 73 74 53 63 72 69 |sed and |PostScri|
|00002360| 70 74 20 63 6f 64 65 20 | 69 73 20 65 73 73 65 6e |pt code |is essen|
|00002370| 74 69 61 6c 6c 79 20 61 | 20 0d 73 74 72 65 61 6d |tially a| .stream|
|00002380| 2d 62 61 73 65 64 20 70 | 72 6f 74 6f 63 6f 6c 2e |-based p|rotocol.|
|00002390| 20 41 6c 74 68 6f 75 67 | 68 20 74 68 65 20 50 6f | Althoug|h the Po|
|000023a0| 73 74 53 63 72 69 70 74 | 20 6c 61 6e 67 75 61 67 |stScript| languag|
|000023b0| 65 20 69 73 20 61 20 70 | 72 6f 67 72 61 6d 6d 69 |e is a p|rogrammi|
|000023c0| 6e 67 20 6c 61 6e 67 75 | 61 67 65 2c 20 64 6f 63 |ng langu|age, doc|
|000023d0| 75 6d 65 6e 74 73 20 75 | 73 75 61 6c 6c 79 20 63 |uments u|sually c|
|000023e0| 6f 6e 73 69 73 74 20 6f | 66 20 61 20 73 65 74 20 |onsist o|f a set |
|000023f0| 6f 66 20 50 6f 73 74 53 | 63 72 69 70 74 20 70 72 |of PostS|cript pr|
|00002400| 6f 63 65 64 75 72 65 73 | 20 66 6f 6c 6c 6f 77 65 |ocedures| followe|
|00002410| 64 20 62 79 20 61 20 73 | 74 72 65 61 6d 20 74 68 |d by a s|tream th|
|00002420| 61 74 20 69 6e 76 6f 6b | 65 73 20 74 68 6f 73 65 |at invok|es those|
|00002430| 20 70 72 6f 63 65 64 75 | 72 65 73 2e 20 45 61 63 | procedu|res. Eac|
|00002440| 68 20 6d 6f 64 65 6c 20 | 68 61 73 20 61 64 76 61 |h model |has adva|
|00002450| 6e 74 61 67 65 73 3a 20 | 57 69 74 68 20 61 20 73 |ntages: |With a s|
|00002460| 74 72 65 61 6d 2d 62 61 | 73 65 64 20 70 72 6f 74 |tream-ba|sed prot|
|00002470| 6f 63 6f 6c 20 74 68 65 | 20 67 72 61 70 68 69 63 |ocol the| graphic|
|00002480| 20 63 6f 6e 74 65 6e 74 | 20 6f 66 20 61 6e 79 20 | content| of any |
|00002490| 67 69 76 65 6e 20 70 61 | 67 65 20 69 73 20 76 69 |given pa|ge is vi|
|000024a0| 72 74 75 61 6c 6c 79 20 | 69 6e 66 69 6e 69 74 65 |rtually |infinite|
|000024b0| 2e 20 41 73 20 6c 6f 6e | 67 20 61 73 20 50 6f 73 |. As lon|g as Pos|
|000024c0| 74 53 63 72 69 70 74 20 | 63 6f 64 65 20 69 73 20 |tScript |code is |
|000024d0| 63 6f 6e 74 69 6e 75 6f | 75 73 6c 79 20 73 74 72 |continuo|usly str|
|000024e0| 65 61 6d 65 64 20 74 6f | 20 74 68 65 20 70 72 69 |eamed to| the pri|
|000024f0| 6e 74 65 72 2c 20 69 74 | 20 72 65 6e 64 65 72 73 |nter, it| renders|
|00002500| 20 69 6e 74 6f 20 74 68 | 65 20 66 72 61 6d 65 20 | into th|e frame |
|00002510| 62 75 66 66 65 72 20 75 | 6e 74 69 6c 20 73 68 6f |buffer u|ntil sho|
|00002520| 77 70 61 67 65 20 69 73 | 20 69 73 73 75 65 64 20 |wpage is| issued |
|00002530| d1 20 77 68 69 63 68 20 | 65 73 73 65 6e 74 69 61 |. which |essentia|
|00002540| 6c 6c 79 20 73 61 79 73 | 2c 20 d2 54 68 69 73 20 |lly says|, .This |
|00002550| 70 61 67 65 20 69 73 20 | 64 6f 6e 65 3b 20 73 74 |page is |done; st|
|00002560| 61 72 74 20 74 68 65 20 | 6e 65 78 74 20 6f 6e 65 |art the |next one|
|00002570| 2e d3 20 57 69 74 68 20 | 61 6e 20 6f 62 6a 65 63 |.. With |an objec|
|00002580| 74 20 6d 6f 64 65 6c 20 | 69 74 d5 73 20 72 65 6c |t model |it.s rel|
|00002590| 61 74 69 76 65 6c 79 20 | 65 61 73 79 20 74 6f 20 |atively |easy to |
|000025a0| 73 68 61 72 65 20 64 61 | 74 61 20 62 65 74 77 65 |share da|ta betwe|
|000025b0| 65 6e 20 6f 62 6a 65 63 | 74 73 2e 20 41 20 71 75 |en objec|ts. A qu|
|000025c0| 69 63 6b 20 73 75 6d 6d | 61 72 79 20 6f 66 20 6f |ick summ|ary of o|
|000025d0| 62 6a 65 63 74 73 20 69 | 6e 20 51 75 69 63 6b 44 |bjects i|n QuickD|
|000025e0| 72 61 77 20 47 58 20 69 | 6c 6c 75 73 74 72 61 74 |raw GX i|llustrat|
|000025f0| 65 73 20 74 68 69 73 20 | 61 64 76 61 6e 74 61 67 |es this |advantag|
|00002600| 65 2e 0d 51 75 69 63 6b | 44 72 61 77 20 47 58 20 |e..Quick|Draw GX |
|00002610| 6f 62 6a 65 63 74 73 2e | 20 54 68 65 20 73 68 61 |objects.| The sha|
|00002620| 70 65 20 6f 62 6a 65 63 | 74 20 69 73 20 74 68 65 |pe objec|t is the|
|00002630| 20 62 61 73 69 63 20 65 | 6c 65 6d 65 6e 74 20 6f | basic e|lement o|
|00002640| 66 20 74 68 65 20 51 75 | 69 63 6b 44 72 61 77 20 |f the Qu|ickDraw |
|00002650| 47 58 20 67 72 61 70 68 | 69 63 73 20 6d 6f 64 65 |GX graph|ics mode|
|00002660| 6c 2e 20 41 20 73 68 61 | 70 65 20 63 6f 6e 74 61 |l. A sha|pe conta|
|00002670| 69 6e 73 20 61 20 67 65 | 6f 6d 65 74 72 79 20 6f |ins a ge|ometry o|
|00002680| 66 20 61 6e 79 20 70 72 | 69 6d 69 74 69 76 65 20 |f any pr|imitive |
|00002690| 74 79 70 65 20 61 6e 64 | 20 70 6f 69 6e 74 73 20 |type and| points |
|000026a0| 74 6f 20 74 68 72 65 65 | 20 6f 74 68 65 72 20 6f |to three| other o|
|000026b0| 62 6a 65 63 74 73 20 74 | 68 61 74 20 64 65 73 63 |bjects t|hat desc|
|000026c0| 72 69 62 65 20 68 6f 77 | 20 74 6f 20 72 65 6e 64 |ribe how| to rend|
|000026d0| 65 72 20 74 68 61 74 20 | 67 65 6f 6d 65 74 72 79 |er that |geometry|
|000026e0| 3a 20 74 68 65 20 69 6e | 6b 20 6f 62 6a 65 63 74 |: the in|k object|
|000026f0| 2c 20 77 68 69 63 68 20 | 64 65 73 63 72 69 62 65 |, which |describe|
|00002700| 73 20 68 6f 77 20 74 6f | 20 61 70 70 6c 79 20 63 |s how to| apply c|
|00002710| 6f 6c 6f 72 20 74 6f 20 | 74 68 65 20 67 65 6f 6d |olor to |the geom|
|00002720| 65 74 72 79 20 28 61 73 | 20 77 65 6c 6c 20 61 73 |etry (as| well as|
|00002730| 20 74 72 61 6e 73 66 65 | 72 20 6d 6f 64 65 29 3b | transfe|r mode);|
|00002740| 20 74 68 65 20 73 74 79 | 6c 65 20 6f 62 6a 65 63 | the sty|le objec|
|00002750| 74 2c 20 77 68 69 63 68 | 20 64 65 73 63 72 69 62 |t, which| describ|
|00002760| 65 73 20 68 6f 77 20 74 | 6f 20 61 66 66 65 63 74 |es how t|o affect|
|00002770| 20 74 68 65 20 67 65 6f | 6d 65 74 72 79 20 62 65 | the geo|metry be|
|00002780| 66 6f 72 65 20 72 65 6e | 64 65 72 69 6e 67 20 28 |fore ren|dering (|
|00002790| 70 61 74 74 65 72 6e 2c | 20 64 61 73 68 2c 20 61 |pattern,| dash, a|
|000027a0| 6e 64 20 73 6f 20 6f 6e | 29 3b 20 61 6e 64 20 74 |nd so on|); and t|
|000027b0| 68 65 20 74 72 61 6e 73 | 66 6f 72 6d 20 6f 62 6a |he trans|form obj|
|000027c0| 65 63 74 2c 20 77 68 69 | 63 68 20 64 65 73 63 72 |ect, whi|ch descr|
|000027d0| 69 62 65 73 20 68 6f 77 | 20 74 6f 20 6d 61 70 20 |ibes how| to map |
|000027e0| 61 6e 64 20 63 6c 69 70 | 20 74 68 65 20 67 65 6f |and clip| the geo|
|000027f0| 6d 65 74 72 79 20 62 65 | 66 6f 72 65 20 72 65 6e |metry be|fore ren|
|00002800| 64 65 72 69 6e 67 2e 20 | 54 68 65 73 65 20 6f 62 |dering. |These ob|
|00002810| 6a 65 63 74 73 20 63 61 | 6e 2c 20 69 6e 20 74 75 |jects ca|n, in tu|
|00002820| 72 6e 2c 20 70 6f 69 6e | 74 20 74 6f 20 6f 74 68 |rn, poin|t to oth|
|00002830| 65 72 20 6f 62 6a 65 63 | 74 73 2e 20 46 6f 72 20 |er objec|ts. For |
|00002840| 65 78 61 6d 70 6c 65 2c | 20 61 20 74 72 61 6e 73 |example,| a trans|
|00002850| 66 6f 72 6d 20 6f 62 6a | 65 63 74 20 70 6f 69 6e |form obj|ect poin|
|00002860| 74 73 20 74 6f 20 61 20 | 6c 69 73 74 20 6f 66 20 |ts to a |list of |
|00002870| 76 69 65 77 20 70 6f 72 | 74 20 6f 62 6a 65 63 74 |view por|t object|
|00002880| 73 20 74 68 61 74 20 64 | 65 73 63 72 69 62 65 20 |s that d|escribe |
|00002890| 77 68 65 72 65 20 74 6f | 20 64 72 61 77 20 74 68 |where to| draw th|
|000028a0| 65 20 67 65 6f 6d 65 74 | 72 79 20 28 73 75 63 68 |e geomet|ry (such|
|000028b0| 20 61 73 20 69 6e 20 77 | 68 69 63 68 20 77 69 6e | as in w|hich win|
|000028c0| 64 6f 77 29 2e 20 41 6e | 20 69 6e 6b 20 6f 62 6a |dow). An| ink obj|
|000028d0| 65 63 74 20 70 6f 69 6e | 74 73 20 74 6f 20 61 20 |ect poin|ts to a |
|000028e0| 63 6f 6c 6f 72 20 70 72 | 6f 66 69 6c 65 20 6f 62 |color pr|ofile ob|
|000028f0| 6a 65 63 74 20 74 68 61 | 74 20 64 65 73 63 72 69 |ject tha|t descri|
|00002900| 62 65 73 20 74 68 65 20 | 63 6f 6c 6f 72 73 20 69 |bes the |colors i|
|00002910| 6e 20 74 68 65 20 69 6e | 6b 20 69 6e 20 61 20 64 |n the in|k in a d|
|00002920| 65 76 69 63 65 2d 69 6e | 64 65 70 65 6e 64 65 6e |evice-in|dependen|
|00002930| 74 20 6d 61 6e 6e 65 72 | 2e 20 41 6c 6c 20 74 68 |t manner|. All th|
|00002940| 65 20 70 72 65 76 69 6f | 75 73 6c 79 20 64 65 73 |e previo|usly des|
|00002950| 63 72 69 62 65 64 20 6f | 62 6a 65 63 74 73 20 63 |cribed o|bjects c|
|00002960| 6f 75 6c 64 20 61 6c 73 | 6f 20 68 61 76 65 20 6c |ould als|o have l|
|00002970| 69 73 74 73 20 6f 66 20 | 74 61 67 20 6f 62 6a 65 |ists of |tag obje|
|00002980| 63 74 73 2e 20 41 20 74 | 61 67 20 6f 62 6a 65 63 |cts. A t|ag objec|
|00002990| 74 20 69 73 20 73 69 6d | 70 6c 79 20 61 20 63 6f |t is sim|ply a co|
|000029a0| 6e 74 61 69 6e 65 72 20 | 66 6f 72 20 61 6e 79 20 |ntainer |for any |
|000029b0| 64 61 74 61 20 74 68 65 | 20 61 70 70 6c 69 63 61 |data the| applica|
|000029c0| 74 69 6f 6e 20 61 73 73 | 6f 63 69 61 74 65 73 20 |tion ass|ociates |
|000029d0| 77 69 74 68 20 74 68 65 | 20 6f 77 6e 69 6e 67 20 |with the| owning |
|000029e0| 6f 62 6a 65 63 74 2e 0d | 44 61 74 61 20 73 68 61 |object..|Data sha|
|000029f0| 72 69 6e 67 20 69 73 20 | 65 78 74 72 65 6d 65 6c |ring is |extremel|
|00002a00| 79 20 65 61 73 79 20 69 | 6e 20 74 68 69 73 20 6f |y easy i|n this o|
|00002a10| 62 6a 65 63 74 20 6d 6f | 64 65 6c 2e 20 49 66 20 |bject mo|del. If |
|00002a20| 49 20 68 61 76 65 20 61 | 20 70 69 63 74 75 72 65 |I have a| picture|
|00002a30| 20 6d 61 64 65 20 75 70 | 20 6f 66 20 31 30 30 20 | made up| of 100 |
|00002a40| 64 69 66 66 65 72 65 6e | 74 20 73 68 61 70 65 73 |differen|t shapes|
|00002a50| 20 61 6e 64 20 33 30 20 | 6f 66 20 74 68 65 6d 20 | and 30 |of them |
|00002a60| 68 61 76 65 20 74 68 65 | 20 73 61 6d 65 20 63 6f |have the| same co|
|00002a70| 6c 6f 72 2c 20 74 68 65 | 73 65 20 33 30 20 73 68 |lor, the|se 30 sh|
|00002a80| 61 70 65 73 20 63 61 6e | 20 61 6c 6c 20 70 6f 69 |apes can| all poi|
|00002a90| 6e 74 20 74 6f 20 74 68 | 65 20 73 61 6d 65 20 69 |nt to th|e same i|
|00002aa0| 6e 6b 20 6f 62 6a 65 63 | 74 2e 20 54 68 65 20 63 |nk objec|t. The c|
|00002ab0| 6f 6c 6f 72 20 66 6f 72 | 20 74 68 65 73 65 20 33 |olor for| these 3|
|00002ac0| 30 20 73 68 61 70 65 73 | 20 69 73 20 73 74 6f 72 |0 shapes| is stor|
|00002ad0| 65 64 20 6f 6e 6c 79 20 | 6f 6e 63 65 2e 20 49 6e |ed only |once. In|
|00002ae0| 20 61 20 73 74 72 65 61 | 6d 2d 62 61 73 65 64 20 | a strea|m-based |
|00002af0| 70 72 6f 74 6f 63 6f 6c | 2c 20 69 74 d5 73 20 6f |protocol|, it.s o|
|00002b00| 6e 6c 79 20 63 6f 6e 76 | 65 6e 69 65 6e 74 20 74 |nly conv|enient t|
|00002b10| 6f 20 73 68 61 72 65 20 | 64 61 74 61 20 62 65 74 |o share |data bet|
|00002b20| 77 65 65 6e 20 63 6f 6e | 73 65 63 75 74 69 76 65 |ween con|secutive|
|00002b30| 20 69 74 65 6d 73 20 69 | 6e 20 74 68 65 20 73 74 | items i|n the st|
|00002b40| 72 65 61 6d 2e 20 28 59 | 6f 75 20 63 61 6e 20 77 |ream. (Y|ou can w|
|00002b50| 72 69 74 65 20 50 6f 73 | 74 53 63 72 69 70 74 20 |rite Pos|tScript |
|00002b60| 63 6f 64 65 20 74 68 61 | 74 20 73 68 61 72 65 73 |code tha|t shares|
|00002b70| 20 64 61 74 61 20 62 65 | 74 77 65 65 6e 20 6e 6f | data be|tween no|
|00002b80| 6e 63 6f 6e 73 65 63 75 | 74 69 76 65 20 6f 62 6a |nconsecu|tive obj|
|00002b90| 65 63 74 73 2c 20 62 75 | 74 20 69 74 d5 73 20 6e |ects, bu|t it.s n|
|00002ba0| 6f 74 20 65 61 73 79 2e | 29 0d 50 6f 73 74 53 63 |ot easy.|).PostSc|
|00002bb0| 72 69 70 74 20 70 72 6f | 63 65 64 75 72 65 73 20 |ript pro|cedures |
|00002bc0| 61 6e 64 20 64 69 63 74 | 69 6f 6e 61 72 69 65 73 |and dict|ionaries|
|00002bd0| 20 76 65 72 73 75 73 20 | 51 75 69 63 6b 44 72 61 | versus |QuickDra|
|00002be0| 77 20 47 58 20 6f 62 6a | 65 63 74 73 2e 20 45 6d |w GX obj|ects. Em|
|00002bf0| 75 6c 61 74 69 6e 67 20 | 74 68 65 20 6f 62 6a 65 |ulating |the obje|
|00002c00| 63 74 20 6d 6f 64 65 6c | 20 69 6e 20 50 6f 73 74 |ct model| in Post|
|00002c10| 53 63 72 69 70 74 20 63 | 6f 64 65 20 69 73 20 70 |Script c|ode is p|
|00002c20| 6f 73 73 69 62 6c 65 20 | 62 65 63 61 75 73 65 20 |ossible |because |
|00002c30| 69 74 d5 73 20 61 20 70 | 72 6f 67 72 61 6d 6d 69 |it.s a p|rogrammi|
|00002c40| 6e 67 20 6c 61 6e 67 75 | 61 67 65 2e 20 59 6f 75 |ng langu|age. You|
|00002c50| 20 63 6f 75 6c 64 20 75 | 73 65 20 50 6f 73 74 53 | could u|se PostS|
|00002c60| 63 72 69 70 74 20 64 69 | 63 74 69 6f 6e 61 72 69 |cript di|ctionari|
|00002c70| 65 73 20 61 73 20 63 6f | 6e 74 61 69 6e 65 72 73 |es as co|ntainers|
|00002c80| 20 66 6f 72 20 73 68 61 | 70 65 73 20 61 6e 64 20 | for sha|pes and |
|00002c90| 74 68 65 6e 20 68 61 76 | 65 20 61 20 50 6f 73 74 |then hav|e a Post|
|00002ca0| 53 63 72 69 70 74 20 70 | 72 6f 63 65 64 75 72 65 |Script p|rocedure|
|00002cb0| 20 74 68 61 74 20 64 72 | 61 77 73 20 6f 6e 65 20 | that dr|aws one |
|00002cc0| 6f 66 20 74 68 65 73 65 | 20 64 69 63 74 69 6f 6e |of these| diction|
|00002cd0| 61 72 69 65 73 2e 20 54 | 68 65 20 66 6f 6c 6c 6f |aries. T|he follo|
|00002ce0| 77 69 6e 67 20 69 73 20 | 61 20 73 69 6d 70 6c 65 |wing is |a simple|
|00002cf0| 20 65 78 61 6d 70 6c 65 | 20 6f 66 20 68 6f 77 20 | example| of how |
|00002d00| 74 68 69 73 20 63 6f 75 | 6c 64 20 77 6f 72 6b 2e |this cou|ld work.|
|00002d10| 20 28 57 61 72 6e 69 6e | 67 3a 20 53 65 72 69 6f | (Warnin|g: Serio|
|00002d20| 75 73 20 50 6f 73 74 53 | 63 72 69 70 74 20 63 6f |us PostS|cript co|
|00002d30| 64 65 20 61 68 65 61 64 | 2e 29 0d 2f 61 53 68 61 |de ahead|.)./aSha|
|00002d40| 70 65 20 37 20 64 69 63 | 74 20 64 65 66 09 09 09 |pe 7 dic|t def...|
|00002d50| 09 09 25 20 4d 61 6b 65 | 20 61 20 64 69 63 74 69 |..% Make| a dicti|
|00002d60| 6f 6e 61 72 79 20 66 6f | 72 20 74 68 65 20 73 68 |onary fo|r the sh|
|00002d70| 61 70 65 2e 0d 61 53 68 | 61 70 65 20 62 65 67 69 |ape..aSh|ape begi|
|00002d80| 6e 09 09 09 09 09 09 09 | 25 20 50 75 74 20 69 74 |n.......|% Put it|
|00002d90| 20 6f 6e 20 74 68 65 20 | 64 69 63 74 69 6f 6e 61 | on the |dictiona|
|00002da0| 72 79 20 73 74 61 63 6b | 2e 0d 09 2f 67 65 6f 6d |ry stack|.../geom|
|00002db0| 65 74 72 79 50 72 6f 63 | 65 64 75 72 65 20 7b 09 |etryProc|edure {.|
|00002dc0| 09 09 25 20 44 65 66 69 | 6e 65 20 61 20 70 72 6f |..% Defi|ne a pro|
|00002dd0| 63 65 64 75 72 65 20 66 | 6f 72 20 74 68 65 20 67 |cedure f|or the g|
|00002de0| 65 6f 6d 65 74 72 79 0d | 09 09 6e 65 77 70 61 74 |eometry.|..newpat|
|00002df0| 68 09 09 09 09 09 09 09 | 25 20 20 74 6f 20 64 72 |h.......|% to dr|
|00002e00| 61 77 20 61 20 72 65 63 | 74 61 6e 67 6c 65 2e 0d |aw a rec|tangle..|
|00002e10| 09 09 31 30 30 20 31 30 | 30 20 6d 6f 76 65 74 6f |..100 10|0 moveto|
|00002e20| 0d 09 09 30 20 31 30 30 | 20 72 6c 69 6e 65 74 6f |...0 100| rlineto|
|00002e30| 09 09 09 09 09 0d 09 09 | 31 30 30 20 30 20 72 6c |........|100 0 rl|
|00002e40| 69 6e 65 74 6f 0d 09 09 | 30 20 2d 31 30 30 20 72 |ineto...|0 -100 r|
|00002e50| 6c 69 6e 65 74 6f 0d 09 | 09 63 6c 6f 73 65 70 61 |lineto..|.closepa|
|00002e60| 74 68 0d 09 7d 20 62 69 | 6e 64 20 64 65 66 09 09 |th..} bi|nd def..|
|00002e70| 0d 09 25 20 44 69 63 74 | 69 6f 6e 61 72 79 20 65 |..% Dict|ionary e|
|00002e80| 6e 74 72 69 65 73 20 66 | 6f 72 20 74 72 61 6e 73 |ntries f|or trans|
|00002e90| 66 6f 72 6d 2e 0d 09 2f | 54 72 61 6e 73 66 6f 72 |form.../|Transfor|
|00002ea0| 6d 20 5b 20 31 30 20 30 | 20 30 20 31 30 20 30 20 |m [ 10 0| 0 10 0 |
|00002eb0| 30 20 5d 20 64 65 66 0d | 09 25 20 44 69 63 74 69 |0 ] def.|.% Dicti|
|00002ec0| 6f 6e 61 72 79 20 65 6e | 74 72 69 65 73 20 66 6f |onary en|tries fo|
|00002ed0| 72 20 74 68 65 20 63 6f | 6c 6f 72 2e 0d 09 2f 72 |r the co|lor.../r|
|00002ee0| 65 64 43 6f 6d 70 6f 6e | 65 6e 74 20 31 2e 30 20 |edCompon|ent 1.0 |
|00002ef0| 64 65 66 0d 09 2f 67 72 | 65 65 6e 43 6f 6d 70 6f |def../gr|eenCompo|
|00002f00| 6e 65 6e 74 20 30 2e 30 | 20 64 65 66 0d 09 2f 62 |nent 0.0| def../b|
|00002f10| 6c 75 65 43 6f 6d 70 6f | 6e 65 6e 74 20 20 31 2e |lueCompo|nent 1.|
|00002f20| 30 20 64 65 66 0d 09 2f | 70 65 6e 57 69 64 74 68 |0 def../|penWidth|
|00002f30| 20 35 2e 30 20 64 65 66 | 0d 09 2f 66 69 6c 6c 54 | 5.0 def|../fillT|
|00002f40| 79 70 65 20 28 66 72 61 | 6d 65 64 29 20 64 65 66 |ype (fra|med) def|
|00002f50| 0d 65 6e 64 09 09 09 09 | 09 09 09 09 09 09 25 20 |.end....|......% |
|00002f60| 44 69 63 74 69 6f 6e 61 | 72 79 20 64 65 66 69 6e |Dictiona|ry defin|
|00002f70| 69 74 69 6f 6e 2e 0d 25 | 20 54 68 65 20 66 6f 6c |ition..%| The fol|
|00002f80| 6c 6f 77 69 6e 67 20 70 | 72 6f 63 65 64 75 72 65 |lowing p|rocedure|
|00002f90| 20 74 61 6b 65 73 20 61 | 20 73 68 61 70 65 20 64 | takes a| shape d|
|00002fa0| 69 63 74 69 6f 6e 61 72 | 79 20 61 6e 64 20 64 72 |ictionar|y and dr|
|00002fb0| 61 77 73 20 69 74 2e 0d | 2f 44 72 61 77 53 68 61 |aws it..|/DrawSha|
|00002fc0| 70 65 44 69 63 74 20 7b | 0d 09 62 65 67 69 6e 09 |peDict {|..begin.|
|00002fd0| 09 09 09 09 09 09 09 20 | 25 20 50 75 74 20 74 68 |....... |% Put th|
|00002fe0| 65 20 73 68 61 70 65 20 | 64 69 63 74 69 6f 6e 61 |e shape |dictiona|
|00002ff0| 72 79 20 6f 6e 20 74 68 | 65 20 73 74 61 63 6b 2e |ry on th|e stack.|
|00003000| 0d 09 67 73 61 76 65 09 | 09 09 09 09 09 09 09 20 |..gsave.|....... |
|00003010| 25 20 53 68 61 70 65 20 | 73 68 6f 75 6c 64 6e 27 |% Shape |shouldn'|
|00003020| 74 20 61 66 66 65 63 74 | 20 67 72 61 70 68 69 63 |t affect| graphic|
|00003030| 73 20 73 74 61 74 65 2e | 0d 09 54 72 61 6e 73 66 |s state.|..Transf|
|00003040| 6f 72 6d 20 63 6f 6e 63 | 61 74 09 09 09 09 09 20 |orm conc|at..... |
|00003050| 25 20 41 70 70 6c 79 20 | 74 72 61 6e 73 66 6f 72 |% Apply |transfor|
|00003060| 6d 2e 0d 09 72 65 64 43 | 6f 6d 70 6f 6e 65 6e 74 |m...redC|omponent|
|00003070| 20 67 72 65 65 6e 43 6f | 6d 70 6f 6e 65 6e 74 20 | greenCo|mponent |
|00003080| 62 6c 75 65 43 6f 6d 70 | 6f 6e 65 6e 74 20 73 65 |blueComp|onent se|
|00003090| 74 72 67 62 63 6f 6c 6f | 72 09 25 20 53 65 74 20 |trgbcolo|r.% Set |
|000030a0| 74 68 65 20 63 6f 6c 6f | 72 2e 0d 09 67 65 6f 6d |the colo|r...geom|
|000030b0| 65 74 72 79 50 72 6f 63 | 65 64 75 72 65 09 09 09 |etryProc|edure...|
|000030c0| 09 20 25 20 45 78 65 63 | 75 74 65 20 74 68 65 20 |. % Exec|ute the |
|000030d0| 67 65 6f 6d 65 74 72 79 | 20 70 72 6f 63 65 64 75 |geometry| procedu|
|000030e0| 72 65 2e 0d 09 66 69 6c | 6c 54 79 70 65 20 28 66 |re...fil|lType (f|
|000030f0| 72 61 6d 65 64 29 20 65 | 71 20 7b 09 09 09 20 25 |ramed) e|q {... %|
|00003100| 20 49 66 20 74 68 65 20 | 73 68 61 70 65 20 69 73 | If the |shape is|
|00003110| 20 66 72 61 6d 65 64 2c | 0d 09 09 70 65 6e 57 69 | framed,|...penWi|
|00003120| 64 74 68 20 73 65 74 6c | 69 6e 65 77 69 64 74 68 |dth setl|inewidth|
|00003130| 09 09 20 25 20 20 73 65 | 74 20 74 68 65 20 70 65 |.. % se|t the pe|
|00003140| 6e 20 77 69 64 74 68 20 | 61 6e 64 0d 09 09 73 74 |n width |and...st|
|00003150| 72 6f 6b 65 09 09 09 09 | 09 09 09 20 25 20 20 73 |roke....|... % s|
|00003160| 74 72 6f 6b 65 20 74 68 | 65 20 70 61 74 68 2e 0d |troke th|e path..|
|00003170| 09 7d 20 7b 09 09 09 09 | 09 09 09 09 09 20 25 20 |.} {....|..... % |
|00003180| 45 6c 73 65 2c 20 66 69 | 6c 6c 20 74 68 65 20 73 |Else, fi|ll the s|
|00003190| 68 61 70 65 2e 20 0d 09 | 09 65 6f 66 69 6c 6c 0d |hape. ..|.eofill.|
|000031a0| 09 7d 20 69 66 65 6c 73 | 65 0d 09 67 72 65 73 74 |.} ifels|e..grest|
|000031b0| 6f 72 65 0d 09 65 6e 64 | 0d 7d 20 62 69 6e 64 20 |ore..end|.} bind |
|000031c0| 64 65 66 0d 25 20 54 68 | 65 20 66 6f 6c 6c 6f 77 |def.% Th|e follow|
|000031d0| 69 6e 67 20 77 6f 75 6c | 64 20 62 65 20 69 6e 20 |ing woul|d be in |
|000031e0| 74 68 65 20 73 74 72 65 | 61 6d 20 74 6f 20 64 72 |the stre|am to dr|
|000031f0| 61 77 20 74 68 65 20 73 | 68 61 70 65 20 73 74 6f |aw the s|hape sto|
|00003200| 72 65 64 20 69 6e 20 74 | 68 65 20 0d 25 20 64 69 |red in t|he .% di|
|00003210| 63 74 69 6f 6e 61 72 79 | 2e 0d 61 53 68 61 70 65 |ctionary|..aShape|
|00003220| 20 44 72 61 77 53 68 61 | 70 65 44 69 63 74 0d 59 | DrawSha|peDict.Y|
|00003230| 6f 75 20 63 6f 75 6c 64 | 20 75 73 65 20 50 6f 73 |ou could| use Pos|
|00003240| 74 53 63 72 69 70 74 20 | 63 6f 64 65 20 69 6e 20 |tScript |code in |
|00003250| 74 68 69 73 20 6d 61 6e | 6e 65 72 2c 20 62 75 74 |this man|ner, but|
|00003260| 20 6d 6f 73 74 20 70 72 | 69 6e 74 65 72 73 20 68 | most pr|inters h|
|00003270| 61 76 65 20 6c 69 6d 69 | 74 65 64 20 6d 65 6d 6f |ave limi|ted memo|
|00003280| 72 79 2c 20 61 6e 64 20 | 6d 65 6d 6f 72 79 20 6d |ry, and |memory m|
|00003290| 61 6e 61 67 65 6d 65 6e | 74 20 69 6e 20 50 6f 73 |anagemen|t in Pos|
|000032a0| 74 53 63 72 69 70 74 20 | 70 72 69 6e 74 65 72 73 |tScript |printers|
|000032b0| 20 69 73 20 64 69 66 66 | 69 63 75 6c 74 20 28 61 | is diff|icult (a|
|000032c0| 20 73 75 62 6a 65 63 74 | 20 66 6f 72 20 61 6e 6f | subject| for ano|
|000032d0| 74 68 65 72 20 61 72 74 | 69 63 6c 65 29 2c 20 73 |ther art|icle), s|
|000032e0| 6f 20 69 74 d5 73 20 75 | 73 75 61 6c 6c 79 20 6e |o it.s u|sually n|
|000032f0| 6f 74 20 64 6f 6e 65 2e | 0d 47 72 61 70 68 69 63 |ot done.|.Graphic|
|00003300| 73 20 73 74 61 74 65 20 | 76 65 72 73 75 73 20 73 |s state |versus s|
|00003310| 68 61 70 65 20 61 74 74 | 72 69 62 75 74 65 73 2e |hape att|ributes.|
|00003320| 20 49 6e 20 61 20 73 74 | 72 65 61 6d 2d 62 61 73 | In a st|ream-bas|
|00003330| 65 64 20 67 72 61 70 68 | 69 63 73 20 6d 6f 64 65 |ed graph|ics mode|
|00003340| 6c 2c 20 61 20 67 72 61 | 70 68 69 63 73 20 73 74 |l, a gra|phics st|
|00003350| 61 74 65 20 64 65 74 65 | 72 6d 69 6e 65 73 20 68 |ate dete|rmines h|
|00003360| 6f 77 20 61 20 70 61 72 | 74 69 63 75 6c 61 72 20 |ow a par|ticular |
|00003370| 69 74 65 6d 20 69 73 20 | 64 72 61 77 6e 2e 20 49 |item is |drawn. I|
|00003380| 6e 20 74 68 65 20 50 6f | 73 74 53 63 72 69 70 74 |n the Po|stScript|
|00003390| 20 6c 61 6e 67 75 61 67 | 65 2c 20 74 68 65 20 67 | languag|e, the g|
|000033a0| 72 61 70 68 69 63 73 20 | 73 74 61 74 65 20 61 74 |raphics |state at|
|000033b0| 74 72 69 62 75 74 65 73 | 20 69 6e 63 6c 75 64 65 |tributes| include|
|000033c0| 20 74 68 65 20 63 6f 6c | 6f 72 2c 20 70 65 6e 20 | the col|or, pen |
|000033d0| 74 68 69 63 6b 6e 65 73 | 73 2c 20 74 72 61 6e 73 |thicknes|s, trans|
|000033e0| 66 6f 72 6d 61 74 69 6f | 6e 20 6d 61 74 72 69 78 |formatio|n matrix|
|000033f0| 2c 20 63 6c 69 70 2c 20 | 6d 69 74 65 72 20 6c 69 |, clip, |miter li|
|00003400| 6d 69 74 2c 20 65 6e 64 | 20 63 61 70 73 2c 20 61 |mit, end| caps, a|
|00003410| 6e 64 20 6a 6f 69 6e 73 | 20 74 68 61 74 20 77 69 |nd joins| that wi|
|00003420| 6c 6c 20 62 65 20 75 73 | 65 64 20 74 6f 20 66 69 |ll be us|ed to fi|
|00003430| 6c 6c 20 6f 72 20 73 74 | 72 6f 6b 65 20 74 68 65 |ll or st|roke the|
|00003440| 20 63 75 72 72 65 6e 74 | 20 70 61 74 68 2c 20 62 | current| path, b|
|00003450| 69 74 6d 61 70 2c 20 6f | 72 20 74 65 78 74 20 74 |itmap, o|r text t|
|00003460| 6f 20 62 65 20 64 72 61 | 77 6e 2e 20 41 70 70 6c |o be dra|wn. Appl|
|00003470| 69 63 61 74 69 6f 6e 73 | 20 75 73 69 6e 67 20 50 |ications| using P|
|00003480| 6f 73 74 53 63 72 69 70 | 74 20 63 6f 64 65 20 6d |ostScrip|t code m|
|00003490| 75 73 74 20 65 66 66 69 | 63 69 65 6e 74 6c 79 20 |ust effi|ciently |
|000034a0| 6d 61 6e 61 67 65 20 74 | 68 65 20 67 72 61 70 68 |manage t|he graph|
|000034b0| 69 63 73 20 73 74 61 74 | 65 20 d1 20 79 6f 75 20 |ics stat|e . you |
|000034c0| 6e 65 76 65 72 20 77 61 | 6e 74 20 74 6f 20 73 65 |never wa|nt to se|
|000034d0| 6e 64 20 6d 6f 72 65 20 | 69 6e 66 6f 72 6d 61 74 |nd more |informat|
|000034e0| 69 6f 6e 20 74 6f 20 74 | 68 65 20 70 72 69 6e 74 |ion to t|he print|
|000034f0| 65 72 20 74 68 61 6e 20 | 6e 65 63 65 73 73 61 72 |er than |necessar|
|00003500| 79 2c 20 62 75 74 20 73 | 65 6e 64 69 6e 67 20 74 |y, but s|ending t|
|00003510| 6f 6f 20 6c 69 74 74 6c | 65 20 69 73 20 66 61 74 |oo littl|e is fat|
|00003520| 61 6c 20 74 6f 20 74 68 | 65 20 66 69 64 65 6c 69 |al to th|e fideli|
|00003530| 74 79 20 6f 66 20 74 68 | 65 20 67 72 61 70 68 69 |ty of th|e graphi|
|00003540| 63 73 2e 20 53 6f 2c 20 | 61 6e 20 0d 61 70 70 6c |cs. So, |an .appl|
|00003550| 69 63 61 74 69 6f 6e 20 | 65 6d 69 74 74 69 6e 67 |ication |emitting|
|00003560| 20 50 6f 73 74 53 63 72 | 69 70 74 20 63 6f 64 65 | PostScr|ipt code|
|00003570| 20 6d 75 73 74 20 73 65 | 6e 64 20 74 68 65 20 63 | must se|nd the c|
|00003580| 6f 6c 6f 72 20 66 6f 72 | 20 74 68 65 20 69 74 65 |olor for| the ite|
|00003590| 6d 20 74 6f 20 62 65 20 | 64 72 61 77 6e 20 6f 6e |m to be |drawn on|
|000035a0| 6c 79 20 69 66 20 69 74 | d5 73 20 64 69 66 66 65 |ly if it|.s diffe|
|000035b0| 72 65 6e 74 20 66 72 6f | 6d 20 74 68 61 74 20 6f |rent fro|m that o|
|000035c0| 66 20 74 68 65 20 6c 61 | 73 74 20 69 74 65 6d 20 |f the la|st item |
|000035d0| 64 72 61 77 6e 2c 20 61 | 6e 64 20 64 6f 20 73 69 |drawn, a|nd do si|
|000035e0| 6d 69 6c 61 72 6c 79 20 | 66 6f 72 20 70 65 6e 20 |milarly |for pen |
|000035f0| 74 68 69 63 6b 6e 65 73 | 73 2c 20 74 72 61 6e 73 |thicknes|s, trans|
|00003600| 66 6f 72 6d 61 74 69 6f | 6e 20 6d 61 74 72 69 78 |formatio|n matrix|
|00003610| 2c 20 61 6e 64 20 73 6f | 20 6f 6e 2e 0d 49 6e 20 |, and so| on..In |
|00003620| 74 68 65 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 |the Quic|kDraw GX|
|00003630| 20 6f 62 6a 65 63 74 2d | 62 61 73 65 64 20 6d 6f | object-|based mo|
|00003640| 64 65 6c 2c 20 65 76 65 | 72 79 20 73 68 61 70 65 |del, eve|ry shape|
|00003650| 20 70 6f 69 6e 74 73 20 | 74 6f 20 61 6c 6c 20 74 | points |to all t|
|00003660| 68 65 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 6e |he infor|mation n|
|00003670| 65 63 65 73 73 61 72 79 | 20 74 6f 20 64 72 61 77 |ecessary| to draw|
|00003680| 20 69 74 73 65 6c 66 2e | 20 41 6e 20 61 70 70 6c | itself.| An appl|
|00003690| 69 63 61 74 69 6f 6e 20 | 6d 65 72 65 6c 79 20 6e |ication |merely n|
|000036a0| 65 65 64 73 20 74 6f 20 | 63 61 6c 6c 20 47 58 44 |eeds to |call GXD|
|000036b0| 72 61 77 53 68 61 70 65 | 20 74 6f 20 64 72 61 77 |rawShape| to draw|
|000036c0| 20 74 68 65 20 73 68 61 | 70 65 20 70 72 6f 70 65 | the sha|pe prope|
|000036d0| 72 6c 79 20 77 69 74 68 | 20 74 68 65 20 64 65 73 |rly with| the des|
|000036e0| 69 67 6e 61 74 65 64 20 | 63 6f 6c 6f 72 20 61 6e |ignated |color an|
|000036f0| 64 20 70 65 6e 20 74 68 | 69 63 6b 6e 65 73 73 20 |d pen th|ickness |
|00003700| 61 6e 64 20 6f 74 68 65 | 72 20 64 65 73 69 67 6e |and othe|r design|
|00003710| 61 74 65 64 20 63 68 61 | 72 61 63 74 65 72 69 73 |ated cha|racteris|
|00003720| 74 69 63 73 2e 20 54 68 | 65 20 61 70 70 6c 69 63 |tics. Th|e applic|
|00003730| 61 74 69 6f 6e 20 6e 6f | 20 6c 6f 6e 67 65 72 20 |ation no| longer |
|00003740| 68 61 73 20 74 6f 20 6b | 65 65 70 20 74 72 61 63 |has to k|eep trac|
|00003750| 6b 20 6f 66 20 74 68 65 | 20 67 72 61 70 68 69 63 |k of the| graphic|
|00003760| 73 20 73 74 61 74 65 2e | 20 48 6f 77 65 76 65 72 |s state.| However|
|00003770| 2c 20 74 68 65 72 65 d5 | 73 20 61 20 64 69 66 66 |, there.|s a diff|
|00003780| 65 72 65 6e 74 20 62 75 | 72 64 65 6e 20 28 74 68 |erent bu|rden (th|
|00003790| 6f 75 67 68 20 6c 65 73 | 73 20 63 75 6d 62 65 72 |ough les|s cumber|
|000037a0| 73 6f 6d 65 29 3a 20 6d | 61 6b 69 6e 67 20 73 75 |some): m|aking su|
|000037b0| 72 65 20 73 68 61 70 65 | 20 6f 62 6a 65 63 74 73 |re shape| objects|
|000037c0| 20 73 68 61 72 65 20 6f | 74 68 65 72 20 6f 62 6a | share o|ther obj|
|000037d0| 65 63 74 73 20 77 68 65 | 6e 20 70 6f 73 73 69 62 |ects whe|n possib|
|000037e0| 6c 65 20 74 6f 20 72 65 | 64 75 63 65 20 74 68 65 |le to re|duce the|
|000037f0| 20 6d 65 6d 6f 72 79 20 | 75 73 65 64 20 62 79 20 | memory |used by |
|00003800| 74 68 65 20 70 69 63 74 | 75 72 65 2e 0d 54 68 65 |the pict|ure..The|
|00003810| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 63 6f 64 65 20 | followi|ng code |
|00003820| 73 61 6d 70 6c 65 73 20 | 65 66 66 65 63 74 69 76 |samples |effectiv|
|00003830| 65 6c 79 20 69 6c 6c 75 | 73 74 72 61 74 65 20 74 |ely illu|strate t|
|00003840| 68 65 20 64 69 66 66 65 | 72 65 6e 63 65 20 62 65 |he diffe|rence be|
|00003850| 74 77 65 65 6e 20 74 68 | 65 20 74 77 6f 20 6d 6f |tween th|e two mo|
|00003860| 64 65 6c 73 2e 20 45 61 | 63 68 20 73 61 6d 70 6c |dels. Ea|ch sampl|
|00003870| 65 20 64 72 61 77 73 20 | 74 77 6f 20 72 65 63 74 |e draws |two rect|
|00003880| 61 6e 67 6c 65 73 2c 20 | 6f 6e 65 20 72 65 64 20 |angles, |one red |
|00003890| 61 6e 64 20 6f 6e 65 20 | 62 6c 75 65 2c 20 61 6e |and one |blue, an|
|000038a0| 64 20 6f 66 66 73 65 74 | 73 20 74 68 65 20 73 65 |d offset|s the se|
|000038b0| 63 6f 6e 64 20 6f 6e 65 | 20 62 79 20 28 31 30 30 |cond one| by (100|
|000038c0| 2c 20 31 30 30 29 2e 20 | 46 69 72 73 74 2c 20 68 |, 100). |First, h|
|000038d0| 65 72 65 d5 73 20 74 68 | 65 20 50 6f 73 74 53 63 |ere.s th|e PostSc|
|000038e0| 72 69 70 74 20 63 6f 64 | 65 3a 0d 2f 44 72 61 77 |ript cod|e:./Draw|
|000038f0| 52 65 63 74 20 7b 31 30 | 30 20 31 30 30 20 6d 6f |Rect {10|0 100 mo|
|00003900| 76 65 74 6f 20 32 35 20 | 30 20 72 6c 69 6e 65 74 |veto 25 |0 rlinet|
|00003910| 6f 20 30 20 32 35 20 72 | 6c 69 6e 65 74 6f 20 2d |o 0 25 r|lineto -|
|00003920| 32 35 20 30 20 72 6c 69 | 6e 65 74 6f 0d 09 63 6c |25 0 rli|neto..cl|
|00003930| 6f 73 65 70 61 74 68 20 | 66 69 6c 6c 7d 20 62 69 |osepath |fill} bi|
|00003940| 6e 64 20 64 65 66 0d 67 | 73 61 76 65 0d 31 2e 30 |nd def.g|save.1.0|
|00003950| 20 30 2e 30 20 30 2e 30 | 20 73 65 74 72 67 62 63 | 0.0 0.0| setrgbc|
|00003960| 6f 6c 6f 72 09 09 09 20 | 25 20 53 65 74 20 74 68 |olor... |% Set th|
|00003970| 65 20 63 6f 6c 6f 72 20 | 72 65 64 2e 0d 44 72 61 |e color |red..Dra|
|00003980| 77 52 65 63 74 0d 31 30 | 30 20 31 30 30 20 74 72 |wRect.10|0 100 tr|
|00003990| 61 6e 73 6c 61 74 65 09 | 09 09 09 09 20 25 20 4d |anslate.|.... % M|
|000039a0| 6f 76 65 20 74 68 65 20 | 63 6f 6f 72 64 69 6e 61 |ove the |coordina|
|000039b0| 74 65 20 73 79 73 74 65 | 6d 20 62 79 20 31 30 30 |te syste|m by 100|
|000039c0| 2c 31 30 30 2e 0d 30 2e | 30 20 30 2e 30 20 31 2e |,100..0.|0 0.0 1.|
|000039d0| 30 20 73 65 74 72 67 62 | 63 6f 6c 6f 72 09 09 09 |0 setrgb|color...|
|000039e0| 20 25 20 53 65 74 20 74 | 68 65 20 63 6f 6c 6f 72 | % Set t|he color|
|000039f0| 20 62 6c 75 65 2e 0d 44 | 72 61 77 52 65 63 74 0d | blue..D|rawRect.|
|00003a00| 67 72 65 73 74 6f 72 65 | 0d 4e 6f 77 20 63 6f 6d |grestore|.Now com|
|00003a10| 70 61 72 65 20 74 68 65 | 20 51 75 69 63 6b 44 72 |pare the| QuickDr|
|00003a20| 61 77 20 47 58 20 63 6f | 64 65 3a 0d 76 6f 69 64 |aw GX co|de:.void|
|00003a30| 20 47 58 44 72 61 77 32 | 52 65 63 74 61 6e 67 6c | GXDraw2|Rectangl|
|00003a40| 65 73 28 29 0d 7b 0d 09 | 67 78 52 65 63 74 61 6e |es().{..|gxRectan|
|00003a50| 67 6c 65 09 61 52 65 63 | 74 61 6e 67 6c 65 20 3d |gle.aRec|tangle =|
|00003a60| 20 7b 20 66 66 28 31 30 | 30 29 2c 20 66 66 28 31 | { ff(10|0), ff(1|
|00003a70| 30 30 29 2c 20 66 66 28 | 31 32 35 29 2c 20 66 66 |00), ff(|125), ff|
|00003a80| 28 31 32 35 29 20 7d 3b | 0d 09 67 78 53 68 61 70 |(125) };|..gxShap|
|00003a90| 65 09 09 09 72 65 63 74 | 53 68 61 70 65 3b 0d 09 |e...rect|Shape;..|
|00003aa0| 67 78 49 6e 6b 09 09 09 | 72 65 64 49 6e 6b 2c 20 |gxInk...|redInk, |
|00003ab0| 62 6c 75 65 49 6e 6b 3b | 0d 09 67 78 43 6f 6c 6f |blueInk;|..gxColo|
|00003ac0| 72 09 09 09 61 43 6f 6c | 6f 72 3b 0d 09 0d 09 61 |r...aCol|or;....a|
|00003ad0| 43 6f 6c 6f 72 2e 73 70 | 61 63 65 20 3d 20 72 67 |Color.sp|ace = rg|
|00003ae0| 62 53 70 61 63 65 3b 09 | 09 09 09 09 09 20 2f 2a |bSpace;.|..... /*|
|00003af0| 20 43 6f 6c 6f 72 20 77 | 69 6c 6c 20 62 65 20 52 | Color w|ill be R|
|00003b00| 47 42 2e 20 2a 2f 0d 09 | 61 43 6f 6c 6f 72 2e 70 |GB. */..|aColor.p|
|00003b10| 72 6f 66 69 6c 65 20 3d | 20 6e 69 6c 3b 09 09 09 |rofile =| nil;...|
|00003b20| 09 09 09 09 20 2f 2a 20 | 4e 6f 20 63 6f 6c 6f 72 |.... /* |No color|
|00003b30| 20 70 72 6f 66 69 6c 65 | 2e 20 2a 2f 0d 09 61 43 | profile|. */..aC|
|00003b40| 6f 6c 6f 72 2e 65 6c 65 | 6d 65 6e 74 2e 72 67 62 |olor.ele|ment.rgb|
|00003b50| 2e 72 65 64 20 3d 20 30 | 78 46 46 46 46 3b 0d 09 |.red = 0|xFFFF;..|
|00003b60| 61 43 6f 6c 6f 72 2e 65 | 6c 65 6d 65 6e 74 2e 72 |aColor.e|lement.r|
|00003b70| 67 62 2e 67 72 65 65 6e | 20 3d 20 30 78 30 30 30 |gb.green| = 0x000|
|00003b80| 30 3b 0d 09 61 43 6f 6c | 6f 72 2e 65 6c 65 6d 65 |0;..aCol|or.eleme|
|00003b90| 6e 74 2e 72 67 62 2e 62 | 6c 75 65 20 3d 20 30 78 |nt.rgb.b|lue = 0x|
|00003ba0| 30 30 30 30 3b 0d 09 72 | 65 64 49 6e 6b 20 3d 20 |0000;..r|edInk = |
|00003bb0| 4e 65 77 49 6e 6b 28 29 | 3b 09 09 09 09 09 09 09 |NewInk()|;.......|
|00003bc0| 09 20 2f 2a 20 4d 61 6b | 65 20 72 65 64 20 69 6e |. /* Mak|e red in|
|00003bd0| 6b 2e 20 2a 2f 0d 09 47 | 58 53 65 74 49 6e 6b 43 |k. */..G|XSetInkC|
|00003be0| 6f 6c 6f 72 28 72 65 64 | 49 6e 6b 2c 20 26 61 43 |olor(red|Ink, &aC|
|00003bf0| 6f 6c 6f 72 29 3b 0d 09 | 61 43 6f 6c 6f 72 2e 65 |olor);..|aColor.e|
|00003c00| 6c 65 6d 65 6e 74 2e 72 | 67 62 2e 72 65 64 20 3d |lement.r|gb.red =|
|00003c10| 20 30 78 30 30 30 30 3b | 0d 09 61 43 6f 6c 6f 72 | 0x0000;|..aColor|
|00003c20| 2e 65 6c 65 6d 65 6e 74 | 2e 72 67 62 2e 67 72 65 |.element|.rgb.gre|
|00003c30| 65 6e 20 3d 20 30 78 30 | 30 30 30 3b 0d 09 61 43 |en = 0x0|000;..aC|
|00003c40| 6f 6c 6f 72 2e 65 6c 65 | 6d 65 6e 74 2e 72 67 62 |olor.ele|ment.rgb|
|00003c50| 2e 62 6c 75 65 20 3d 20 | 30 78 46 46 46 46 3b 0d |.blue = |0xFFFF;.|
|00003c60| 09 62 6c 75 65 49 6e 6b | 20 3d 20 4e 65 77 49 6e |.blueInk| = NewIn|
|00003c70| 6b 28 29 3b 09 09 09 09 | 09 09 09 09 20 2f 2a 20 |k();....|.... /* |
|00003c80| 4d 61 6b 65 20 62 6c 75 | 65 20 69 6e 6b 2e 20 2a |Make blu|e ink. *|
|00003c90| 2f 0d 09 47 58 53 65 74 | 49 6e 6b 43 6f 6c 6f 72 |/..GXSet|InkColor|
|00003ca0| 28 62 6c 75 65 49 6e 6b | 2c 20 26 61 43 6f 6c 6f |(blueInk|, &aColo|
|00003cb0| 72 29 3b 0d 09 72 65 63 | 74 53 68 61 70 65 20 3d |r);..rec|tShape =|
|00003cc0| 20 47 58 4e 65 77 52 65 | 63 74 61 6e 67 6c 65 28 | GXNewRe|ctangle(|
|00003cd0| 26 61 52 65 63 74 61 6e | 67 6c 65 29 3b 20 2f 2a |&aRectan|gle); /*|
|00003ce0| 20 43 72 65 61 74 65 20 | 61 20 73 68 61 70 65 2e | Create |a shape.|
|00003cf0| 20 2a 2f 0d 09 47 58 53 | 65 74 53 68 61 70 65 49 | */..GXS|etShapeI|
|00003d00| 6e 6b 28 72 65 63 74 53 | 68 61 70 65 2c 20 72 65 |nk(rectS|hape, re|
|00003d10| 64 49 6e 6b 29 3b 09 09 | 09 20 2f 2a 20 55 73 65 |dInk);..|. /* Use|
|00003d20| 20 72 65 64 20 69 6e 6b | 2e 20 2a 2f 0d 09 47 58 | red ink|. */..GX|
|00003d30| 44 72 61 77 53 68 61 70 | 65 28 72 65 63 74 53 68 |DrawShap|e(rectSh|
|00003d40| 61 70 65 29 3b 09 09 09 | 09 09 09 20 2f 2a 20 44 |ape);...|... /* D|
|00003d50| 72 61 77 20 69 74 2e 20 | 2a 2f 0d 09 0d 09 2f 2a |raw it. |*/..../*|
|00003d60| 20 4d 6f 76 65 20 69 74 | 20 6f 76 65 72 20 61 6e | Move it| over an|
|00003d70| 64 20 64 72 61 77 20 69 | 74 20 69 6e 20 62 6c 75 |d draw i|t in blu|
|00003d80| 65 2e 20 2a 2f 0d 09 47 | 58 4d 6f 76 65 53 68 61 |e. */..G|XMoveSha|
|00003d90| 70 65 28 72 65 63 74 53 | 68 61 70 65 2c 20 66 66 |pe(rectS|hape, ff|
|00003da0| 28 31 30 30 29 2c 20 66 | 66 28 31 30 30 29 29 3b |(100), f|f(100));|
|00003db0| 0d 09 47 58 53 65 74 53 | 68 61 70 65 49 6e 6b 28 |..GXSetS|hapeInk(|
|00003dc0| 72 65 63 74 53 68 61 70 | 65 2c 20 62 6c 75 65 49 |rectShap|e, blueI|
|00003dd0| 6e 6b 29 3b 09 09 20 2f | 2a 20 55 73 65 20 62 6c |nk);.. /|* Use bl|
|00003de0| 75 65 20 69 6e 6b 2e 20 | 2a 2f 0d 09 47 58 44 72 |ue ink. |*/..GXDr|
|00003df0| 61 77 53 68 61 70 65 28 | 72 65 63 74 53 68 61 70 |awShape(|rectShap|
|00003e00| 65 29 3b 09 09 09 09 09 | 09 20 2f 2a 20 44 72 61 |e);.....|. /* Dra|
|00003e10| 77 20 69 74 2e 20 2a 2f | 0d 09 2f 2a 20 43 6c 65 |w it. */|../* Cle|
|00003e20| 61 6e 20 75 70 2e 20 2a | 2f 0d 09 47 58 44 69 73 |an up. *|/..GXDis|
|00003e30| 70 6f 73 65 53 68 61 70 | 65 28 72 65 63 74 53 68 |poseShap|e(rectSh|
|00003e40| 61 70 65 29 3b 0d 09 47 | 58 44 69 73 70 6f 73 65 |ape);..G|XDispose|
|00003e50| 49 6e 6b 28 62 6c 75 65 | 49 6e 6b 29 3b 0d 09 47 |Ink(blue|Ink);..G|
|00003e60| 58 44 69 73 70 6f 73 65 | 49 6e 6b 28 72 65 64 49 |XDispose|Ink(redI|
|00003e70| 6e 6b 29 3b 0d 7d 0d 54 | 68 65 20 50 6f 73 74 53 |nk);.}.T|he PostS|
|00003e80| 63 72 69 70 74 20 63 6f | 64 65 20 75 73 65 73 20 |cript co|de uses |
|00003e90| 61 20 70 72 6f 63 65 64 | 75 72 65 20 74 6f 20 64 |a proced|ure to d|
|00003ea0| 72 61 77 20 74 68 65 20 | 72 65 63 74 61 6e 67 6c |raw the |rectangl|
|00003eb0| 65 2e 20 54 68 65 20 70 | 72 6f 63 65 64 75 72 65 |e. The p|rocedure|
|00003ec0| 20 69 73 20 61 6e 61 6c | 6f 67 6f 75 73 20 74 6f | is anal|ogous to|
|00003ed0| 20 74 68 65 20 73 68 61 | 70 65 20 6f 62 6a 65 63 | the sha|pe objec|
|00003ee0| 74 2e 20 48 6f 77 65 76 | 65 72 2c 20 65 61 63 68 |t. Howev|er, each|
|00003ef0| 20 74 69 6d 65 20 74 68 | 65 20 72 65 63 74 61 6e | time th|e rectan|
|00003f00| 67 6c 65 20 69 73 20 64 | 72 61 77 6e 2c 20 74 68 |gle is d|rawn, th|
|00003f10| 65 20 67 72 61 70 68 69 | 63 73 20 73 74 61 74 65 |e graphi|cs state|
|00003f20| 20 6d 75 73 74 20 62 65 | 20 6d 6f 64 69 66 69 65 | must be| modifie|
|00003f30| 64 20 74 6f 20 63 68 61 | 6e 67 65 20 74 68 65 20 |d to cha|nge the |
|00003f40| 63 6f 6c 6f 72 20 61 6e | 64 20 74 68 65 20 74 72 |color an|d the tr|
|00003f50| 61 6e 73 66 6f 72 6d 61 | 74 69 6f 6e 2e 20 41 74 |ansforma|tion. At|
|00003f60| 20 74 68 65 20 65 6e 64 | 2c 20 74 68 65 20 67 72 | the end|, the gr|
|00003f70| 61 70 68 69 63 73 20 73 | 74 61 74 65 20 66 6f 72 |aphics s|tate for|
|00003f80| 20 73 75 62 73 65 71 75 | 65 6e 74 6c 79 20 64 72 | subsequ|ently dr|
|00003f90| 61 77 6e 20 69 74 65 6d | 73 20 69 73 20 62 6c 75 |awn item|s is blu|
|00003fa0| 65 20 61 6e 64 20 74 68 | 65 20 6f 72 69 67 69 6e |e and th|e origin|
|00003fb0| 20 69 73 20 73 68 69 66 | 74 65 64 20 62 79 20 28 | is shif|ted by (|
|00003fc0| 31 30 30 2c 20 31 30 30 | 29 20 66 72 6f 6d 20 74 |100, 100|) from t|
|00003fd0| 68 65 20 6f 72 69 67 69 | 6e 61 6c 20 72 65 63 74 |he origi|nal rect|
|00003fe0| 61 6e 67 6c 65 2e 20 54 | 68 65 20 67 72 65 73 74 |angle. T|he grest|
|00003ff0| 6f 72 65 20 6f 70 65 72 | 61 74 6f 72 20 69 73 20 |ore oper|ator is |
|00004000| 6e 65 65 64 65 64 20 74 | 6f 20 73 65 74 20 74 68 |needed t|o set th|
|00004010| 65 20 67 72 61 70 68 69 | 63 73 20 73 74 61 74 65 |e graphi|cs state|
|00004020| 20 62 61 63 6b 20 74 6f | 20 77 68 61 74 20 69 74 | back to| what it|
|00004030| 20 77 61 73 20 74 6f 20 | 62 65 67 69 6e 20 77 69 | was to |begin wi|
|00004040| 74 68 2e 20 0d 54 68 65 | 20 51 75 69 63 6b 44 72 |th. .The| QuickDr|
|00004050| 61 77 20 47 58 20 63 6f | 64 65 20 63 72 65 61 74 |aw GX co|de creat|
|00004060| 65 64 20 61 20 73 68 61 | 70 65 2c 20 6d 61 64 65 |ed a sha|pe, made|
|00004070| 20 69 74 20 72 65 64 2c | 20 64 72 65 77 20 69 74 | it red,| drew it|
|00004080| 2c 20 6d 6f 76 65 64 20 | 69 74 2c 20 6d 61 64 65 |, moved |it, made|
|00004090| 20 69 74 20 62 6c 75 65 | 2c 20 61 6e 64 20 64 72 | it blue|, and dr|
|000040a0| 65 77 20 69 74 20 61 67 | 61 69 6e 2e 20 4e 6f 20 |ew it ag|ain. No |
|000040b0| 67 6c 6f 62 61 6c 20 73 | 74 61 74 65 20 77 61 73 |global s|tate was|
|000040c0| 20 61 66 66 65 63 74 65 | 64 2c 20 6f 6e 6c 79 20 | affecte|d, only |
|000040d0| 74 68 65 20 73 68 61 70 | 65 20 69 74 73 65 6c 66 |the shap|e itself|
|000040e0| 2e 20 4d 6f 76 69 6e 67 | 20 74 68 65 20 72 65 63 |. Moving| the rec|
|000040f0| 74 61 6e 67 6c 65 20 77 | 69 74 68 20 50 6f 73 74 |tangle w|ith Post|
|00004100| 53 63 72 69 70 74 20 63 | 6f 64 65 20 6e 65 63 65 |Script c|ode nece|
|00004110| 73 73 69 74 61 74 65 64 | 20 6d 6f 64 69 66 79 69 |ssitated| modifyi|
|00004120| 6e 67 20 74 68 65 20 67 | 72 61 70 68 69 63 73 20 |ng the g|raphics |
|00004130| 73 74 61 74 65 d5 73 20 | 43 54 4d 2e 20 57 69 74 |state.s |CTM. Wit|
|00004140| 68 20 51 75 69 63 6b 44 | 72 61 77 20 47 58 20 63 |h QuickD|raw GX c|
|00004150| 6f 64 65 2c 20 6d 6f 76 | 69 6e 67 20 74 68 65 20 |ode, mov|ing the |
|00004160| 72 65 63 74 61 6e 67 6c | 65 20 69 6e 76 6f 6c 76 |rectangl|e involv|
|00004170| 65 64 20 6f 6e 6c 79 20 | 74 72 61 6e 73 6c 61 74 |ed only |translat|
|00004180| 69 6e 67 20 74 68 65 20 | 73 68 61 70 65 d5 73 20 |ing the |shape.s |
|00004190| 6f 77 6e 20 67 65 6f 6d | 65 74 72 79 20 77 69 74 |own geom|etry wit|
|000041a0| 68 20 74 68 65 20 47 58 | 4d 6f 76 65 53 68 61 70 |h the GX|MoveShap|
|000041b0| 65 20 72 6f 75 74 69 6e | 65 2e 0d 51 75 69 63 6b |e routin|e..Quick|
|000041c0| 44 72 61 77 20 47 58 20 | 64 61 74 61 62 61 73 65 |Draw GX |database|
|000041d0| 20 76 65 72 73 75 73 20 | 50 6f 73 74 53 63 72 69 | versus |PostScri|
|000041e0| 70 74 20 63 6f 6e 74 61 | 69 6e 65 72 2e 20 49 6e |pt conta|iner. In|
|000041f0| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 61 20 | QuickDr|aw GX a |
|00004200| 70 69 63 74 75 72 65 20 | 69 73 20 61 20 74 79 70 |picture |is a typ|
|00004210| 65 20 6f 66 20 73 68 61 | 70 65 20 6f 62 6a 65 63 |e of sha|pe objec|
|00004220| 74 20 77 68 6f 73 65 20 | 67 65 6f 6d 65 74 72 79 |t whose |geometry|
|00004230| 20 69 73 20 61 20 6c 69 | 73 74 20 6f 66 20 6f 74 | is a li|st of ot|
|00004240| 68 65 72 20 73 68 61 70 | 65 73 2e 20 54 68 6f 73 |her shap|es. Thos|
|00004250| 65 20 73 68 61 70 65 73 | 20 69 6e 20 74 68 65 20 |e shapes| in the |
|00004260| 6c 69 73 74 20 63 61 6e | 20 61 6c 73 6f 20 62 65 |list can| also be|
|00004270| 20 70 69 63 74 75 72 65 | 20 73 68 61 70 65 73 2e | picture| shapes.|
|00004280| 20 54 68 65 72 65 66 6f | 72 65 2c 20 61 20 51 75 | Therefo|re, a Qu|
|00004290| 69 63 6b 44 72 61 77 20 | 47 58 20 70 69 63 74 75 |ickDraw |GX pictu|
|000042a0| 72 65 20 73 68 61 70 65 | 20 69 73 20 61 20 68 69 |re shape| is a hi|
|000042b0| 65 72 61 72 63 68 69 63 | 61 6c 20 64 61 74 61 62 |erarchic|al datab|
|000042c0| 61 73 65 20 6f 66 20 73 | 68 61 70 65 73 2e 20 54 |ase of s|hapes. T|
|000042d0| 68 69 73 20 64 61 74 61 | 62 61 73 65 20 63 61 6e |his data|base can|
|000042e0| 20 62 65 20 71 75 65 72 | 69 65 64 20 61 6e 64 20 | be quer|ied and |
|000042f0| 6d 6f 64 69 66 69 65 64 | 20 77 69 74 68 20 51 75 |modified| with Qu|
|00004300| 69 63 6b 44 72 61 77 20 | 47 58 20 72 6f 75 74 69 |ickDraw |GX routi|
|00004310| 6e 65 73 20 73 75 63 68 | 20 61 73 20 47 58 53 65 |nes such| as GXSe|
|00004320| 74 50 69 63 74 75 72 65 | 50 61 72 74 73 2c 20 77 |tPicture|Parts, w|
|00004330| 68 69 63 68 20 69 6e 73 | 65 72 74 73 20 6f 72 20 |hich ins|erts or |
|00004340| 72 65 70 6c 61 63 65 73 | 20 73 68 61 70 65 73 20 |replaces| shapes |
|00004350| 69 6e 20 61 20 70 69 63 | 74 75 72 65 20 73 68 61 |in a pic|ture sha|
|00004360| 70 65 2c 20 61 6e 64 20 | 47 58 47 65 74 50 69 63 |pe, and |GXGetPic|
|00004370| 74 75 72 65 50 61 72 74 | 73 2c 20 77 68 69 63 68 |turePart|s, which|
|00004380| 20 72 65 74 72 69 65 76 | 65 73 20 73 68 61 70 65 | retriev|es shape|
|00004390| 73 20 66 72 6f 6d 20 61 | 20 70 69 63 74 75 72 65 |s from a| picture|
|000043a0| 2e 20 53 69 6e 63 65 20 | 61 20 70 69 63 74 75 72 |. Since |a pictur|
|000043b0| 65 20 63 61 6e 20 68 61 | 76 65 20 6f 62 6a 65 63 |e can ha|ve objec|
|000043c0| 74 73 20 74 68 61 74 20 | 72 65 66 65 72 20 74 6f |ts that |refer to|
|000043d0| 20 65 61 63 68 20 6f 74 | 68 65 72 2c 20 51 75 69 | each ot|her, Qui|
|000043e0| 63 6b 44 72 61 77 20 47 | 58 20 6d 75 73 74 20 68 |ckDraw G|X must h|
|000043f0| 61 76 65 20 74 68 65 20 | 77 68 6f 6c 65 20 70 69 |ave the |whole pi|
|00004400| 63 74 75 72 65 20 73 68 | 61 70 65 20 61 76 61 69 |cture sh|ape avai|
|00004410| 6c 61 62 6c 65 20 61 74 | 20 6f 6e 65 20 74 69 6d |lable at| one tim|
|00004420| 65 20 28 61 6c 74 68 6f | 75 67 68 20 6e 6f 74 20 |e (altho|ugh not |
|00004430| 61 63 74 75 61 6c 6c 79 | 20 69 6e 20 6d 65 6d 6f |actually| in memo|
|00004440| 72 79 2c 20 62 75 74 20 | 72 61 74 68 65 72 20 69 |ry, but |rather i|
|00004450| 6e 20 74 68 65 20 64 69 | 73 6b 2d 62 61 73 65 64 |n the di|sk-based|
|00004460| 20 62 61 63 6b 69 6e 67 | 20 73 74 6f 72 65 20 69 | backing| store i|
|00004470| 6e 20 6c 6f 77 2d 6d 65 | 6d 6f 72 79 20 63 6f 6e |n low-me|mory con|
|00004480| 64 69 74 69 6f 6e 73 29 | 2e 0d 41 20 50 6f 73 74 |ditions)|..A Post|
|00004490| 53 63 72 69 70 74 20 66 | 69 6c 65 20 64 65 73 63 |Script f|ile desc|
|000044a0| 72 69 62 69 6e 67 20 61 | 20 70 69 63 74 75 72 65 |ribing a| picture|
|000044b0| 20 69 73 20 65 73 73 65 | 6e 74 69 61 6c 6c 79 20 | is esse|ntially |
|000044c0| 61 20 63 6f 6e 74 61 69 | 6e 65 72 20 66 6f 72 20 |a contai|ner for |
|000044d0| 67 72 61 70 68 69 63 73 | 2e 20 54 68 65 20 66 69 |graphics|. The fi|
|000044e0| 6c 65 20 63 6f 6e 74 61 | 69 6e 73 20 61 6c 6c 20 |le conta|ins all |
|000044f0| 74 68 65 20 64 61 74 61 | 20 6e 65 65 64 65 64 20 |the data| needed |
|00004500| 74 6f 20 64 72 61 77 20 | 74 68 65 20 70 69 63 74 |to draw |the pict|
|00004510| 75 72 65 2c 20 62 75 74 | 20 69 74 20 63 61 6e d5 |ure, but| it can.|
|00004520| 74 20 62 65 20 72 65 61 | 64 69 6c 79 20 65 64 69 |t be rea|dily edi|
|00004530| 74 65 64 20 6f 72 20 71 | 75 65 72 69 65 64 20 77 |ted or q|ueried w|
|00004540| 69 74 68 6f 75 74 20 68 | 61 76 69 6e 67 20 61 6e |ithout h|aving an|
|00004550| 20 69 6e 74 65 72 70 72 | 65 74 65 72 20 66 6f 72 | interpr|eter for|
|00004560| 20 74 68 65 20 50 6f 73 | 74 53 63 72 69 70 74 20 | the Pos|tScript |
|00004570| 6c 61 6e 67 75 61 67 65 | 20 62 75 69 6c 74 20 69 |language| built i|
|00004580| 6e 74 6f 20 79 6f 75 72 | 20 0d 61 70 70 6c 69 63 |nto your| .applic|
|00004590| 61 74 69 6f 6e 2e 20 54 | 68 65 20 50 6f 73 74 53 |ation. T|he PostS|
|000045a0| 63 72 69 70 74 20 73 74 | 72 65 61 6d 2d 62 61 73 |cript st|ream-bas|
|000045b0| 65 64 20 70 72 6f 74 6f | 63 6f 6c 20 6c 65 74 73 |ed proto|col lets|
|000045c0| 20 74 68 65 20 64 65 76 | 69 63 65 20 64 72 61 77 | the dev|ice draw|
|000045d0| 20 74 68 65 20 73 74 72 | 65 61 6d 20 6f 6e 20 74 | the str|eam on t|
|000045e0| 68 65 20 66 6c 79 2e 0d | 41 67 61 69 6e 2c 20 65 |he fly..|Again, e|
|000045f0| 61 63 68 20 6d 6f 64 65 | 6c 20 68 61 73 20 69 74 |ach mode|l has it|
|00004600| 73 20 61 64 76 61 6e 74 | 61 67 65 73 2e 20 54 68 |s advant|ages. Th|
|00004610| 65 20 6f 62 6a 65 63 74 | 20 6d 6f 64 65 6c 20 69 |e object| model i|
|00004620| 73 20 62 65 73 74 20 73 | 75 69 74 65 64 20 66 6f |s best s|uited fo|
|00004630| 72 20 69 6e 74 65 72 61 | 63 74 69 76 65 20 61 70 |r intera|ctive ap|
|00004640| 70 6c 69 63 61 74 69 6f | 6e 73 20 61 6e 64 20 74 |plicatio|ns and t|
|00004650| 68 65 20 73 74 72 65 61 | 6d 2d 62 61 73 65 64 20 |he strea|m-based |
|00004660| 70 72 6f 74 6f 63 6f 6c | 20 69 73 20 62 65 73 74 |protocol| is best|
|00004670| 20 73 75 69 74 65 64 20 | 66 6f 72 20 70 72 69 6e | suited |for prin|
|00004680| 74 65 72 73 20 77 69 74 | 68 20 6c 69 6d 69 74 65 |ters wit|h limite|
|00004690| 64 20 6d 65 6d 6f 72 79 | 20 61 6e 64 20 6e 6f 20 |d memory| and no |
|000046a0| 64 69 73 6b 20 64 72 69 | 76 65 73 2e 0d 54 45 58 |disk dri|ves..TEX|
|000046b0| 54 2d 44 52 41 57 49 4e | 47 20 4d 4f 44 45 4c 53 |T-DRAWIN|G MODELS|
|000046c0| 0d 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 63 6f |.QuickDr|aw GX co|
|000046d0| 6e 74 61 69 6e 73 20 74 | 68 72 65 65 20 64 69 66 |ntains t|hree dif|
|000046e0| 66 65 72 65 6e 74 20 74 | 79 70 65 73 20 6f 66 20 |ferent t|ypes of |
|000046f0| 73 68 61 70 65 20 6f 62 | 6a 65 63 74 73 20 66 6f |shape ob|jects fo|
|00004700| 72 20 64 72 61 77 69 6e | 67 20 74 65 78 74 3a 20 |r drawin|g text: |
|00004710| 74 68 65 20 74 65 78 74 | 20 74 79 70 65 2c 20 74 |the text| type, t|
|00004720| 68 65 20 67 6c 79 70 68 | 20 74 79 70 65 2c 20 61 |he glyph| type, a|
|00004730| 6e 64 20 74 68 65 20 6c | 61 79 6f 75 74 20 74 79 |nd the l|ayout ty|
|00004740| 70 65 2e 20 54 68 65 20 | 74 65 78 74 20 74 79 70 |pe. The |text typ|
|00004750| 65 20 69 73 20 74 68 65 | 20 73 69 6d 70 6c 65 73 |e is the| simples|
|00004760| 74 20 6f 66 20 74 68 65 | 20 74 68 72 65 65 2c 20 |t of the| three, |
|00004770| 61 6c 74 68 6f 75 67 68 | 20 69 74 d5 73 20 6e 6f |although| it.s no|
|00004780| 74 20 74 68 65 20 6d 6f | 73 74 20 70 72 69 6d 69 |t the mo|st primi|
|00004790| 74 69 76 65 20 66 6f 72 | 6d 2e 20 44 72 61 77 69 |tive for|m. Drawi|
|000047a0| 6e 67 20 61 20 74 65 78 | 74 20 73 68 61 70 65 20 |ng a tex|t shape |
|000047b0| 69 73 20 73 69 6d 69 6c | 61 72 20 74 6f 20 75 73 |is simil|ar to us|
|000047c0| 69 6e 67 20 74 68 65 20 | 50 6f 73 74 53 63 72 69 |ing the |PostScri|
|000047d0| 70 74 20 73 68 6f 77 20 | 6f 70 65 72 61 74 6f 72 |pt show |operator|
|000047e0| 2c 20 61 73 20 69 6c 6c | 75 73 74 72 61 74 65 64 |, as ill|ustrated|
|000047f0| 20 62 79 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | by the |followin|
|00004800| 67 20 63 6f 64 65 20 73 | 61 6d 70 6c 65 73 2e 20 |g code s|amples. |
|00004810| 46 69 72 73 74 2c 20 68 | 65 72 65 d5 73 20 61 20 |First, h|ere.s a |
|00004820| 50 6f 73 74 53 63 72 69 | 70 74 20 d2 48 65 6c 6c |PostScri|pt .Hell|
|00004830| 6f 20 57 6f 72 6c 64 d3 | 20 70 72 6f 67 72 61 6d |o World.| program|
|00004840| 3a 0d 2f 54 69 6d 65 73 | 2d 52 6f 6d 61 6e 20 66 |:./Times|-Roman f|
|00004850| 69 6e 64 66 6f 6e 74 09 | 09 09 09 25 20 47 65 74 |indfont.|...% Get|
|00004860| 20 74 68 65 20 66 6f 6e | 74 20 64 69 63 74 69 6f | the fon|t dictio|
|00004870| 6e 61 72 79 20 66 6f 72 | 20 54 69 6d 65 73 2e 0d |nary for| Times..|
|00004880| 32 34 20 73 63 61 6c 65 | 66 6f 6e 74 09 09 09 09 |24 scale|font....|
|00004890| 09 09 09 25 20 53 63 61 | 6c 65 20 69 74 20 74 6f |...% Sca|le it to|
|000048a0| 20 32 34 20 70 6f 69 6e | 74 73 2e 0d 73 65 74 66 | 24 poin|ts..setf|
|000048b0| 6f 6e 74 09 09 09 09 09 | 09 09 09 09 25 20 4d 61 |ont.....|....% Ma|
|000048c0| 6b 65 20 69 74 20 74 68 | 65 20 63 75 72 72 65 6e |ke it th|e curren|
|000048d0| 74 20 66 6f 6e 74 2e 0d | 31 30 30 20 31 30 30 20 |t font..|100 100 |
|000048e0| 6d 6f 76 65 74 6f 09 09 | 09 09 09 09 25 20 4d 6f |moveto..|....% Mo|
|000048f0| 76 65 20 74 6f 20 6c 6f | 63 61 74 69 6f 6e 20 31 |ve to lo|cation 1|
|00004900| 30 30 2c 20 31 30 30 2e | 0d 28 48 65 6c 6c 6f 20 |00, 100.|.(Hello |
|00004910| 57 6f 72 6c 64 29 20 73 | 68 6f 77 09 09 09 09 09 |World) s|how.....|
|00004920| 25 20 44 72 61 77 20 74 | 68 65 20 74 65 78 74 2e |% Draw t|he text.|
|00004930| 0d 4e 6f 77 20 68 65 72 | 65 d5 73 20 74 68 65 20 |.Now her|e.s the |
|00004940| 51 75 69 63 6b 44 72 61 | 77 20 47 58 20 d2 48 65 |QuickDra|w GX .He|
|00004950| 6c 6c 6f 20 57 6f 72 6c | 64 d3 20 70 72 6f 67 72 |llo Worl|d. progr|
|00004960| 61 6d 3a 0d 76 6f 69 64 | 20 47 58 48 65 6c 6c 6f |am:.void| GXHello|
|00004970| 57 6f 72 6c 64 28 76 6f | 69 64 29 0d 7b 0d 09 67 |World(vo|id).{..g|
|00004980| 78 53 68 61 70 65 09 09 | 09 20 68 65 6c 6c 6f 53 |xShape..|. helloS|
|00004990| 68 61 70 65 3b 0d 09 67 | 78 46 6f 6e 74 09 09 09 |hape;..g|xFont...|
|000049a0| 20 61 46 6f 6e 74 3b 0d | 09 67 78 50 6f 69 6e 74 | aFont;.|.gxPoint|
|000049b0| 09 09 09 20 6c 6f 63 61 | 74 69 6f 6e 20 3d 20 7b |... loca|tion = {|
|000049c0| 66 66 28 31 30 30 29 2c | 20 66 66 28 31 30 30 29 |ff(100),| ff(100)|
|000049d0| 7d 3b 0d 09 2f 2a 20 46 | 69 6e 64 20 74 68 65 20 |};../* F|ind the |
|000049e0| 66 6f 6e 74 20 6f 62 6a | 65 63 74 20 66 6f 72 20 |font obj|ect for |
|000049f0| 54 69 6d 65 73 2e 20 2a | 2f 0d 09 61 46 6f 6e 74 |Times. *|/..aFont|
|00004a00| 20 3d 20 46 69 6e 64 50 | 4e 61 6d 65 46 6f 6e 74 | = FindP|NameFont|
|00004a10| 28 66 75 6c 6c 46 6f 6e | 74 4e 61 6d 65 2c 20 22 |(fullFon|tName, "|
|00004a20| 5c 70 54 69 6d 65 73 20 | 52 6f 6d 61 6e 22 29 3b |\pTimes |Roman");|
|00004a30| 0d 09 2f 2a 20 4d 61 6b | 65 20 61 20 74 65 78 74 |../* Mak|e a text|
|00004a40| 20 73 68 61 70 65 2e 20 | 2a 2f 0d 09 68 65 6c 6c | shape. |*/..hell|
|00004a50| 6f 53 68 61 70 65 20 3d | 20 4e 65 77 54 65 78 74 |oShape =| NewText|
|00004a60| 28 31 31 2c 20 22 48 65 | 6c 6c 6f 20 77 6f 72 6c |(11, "He|llo worl|
|00004a70| 64 22 2c 20 26 6c 6f 63 | 61 74 69 6f 6e 29 3b 0d |d", &loc|ation);.|
|00004a80| 09 47 58 53 65 74 53 68 | 61 70 65 46 6f 6e 74 28 |.GXSetSh|apeFont(|
|00004a90| 68 65 6c 6c 6f 53 68 61 | 70 65 2c 20 61 46 6f 6e |helloSha|pe, aFon|
|00004aa0| 74 29 3b 0d 09 47 58 53 | 65 74 53 68 61 70 65 54 |t);..GXS|etShapeT|
|00004ab0| 65 78 74 53 69 7a 65 28 | 68 65 6c 6c 6f 53 68 61 |extSize(|helloSha|
|00004ac0| 70 65 2c 20 66 66 28 32 | 34 29 29 3b 0d 09 47 58 |pe, ff(2|4));..GX|
|00004ad0| 44 72 61 77 53 68 61 70 | 65 28 68 65 6c 6c 6f 53 |DrawShap|e(helloS|
|00004ae0| 68 61 70 65 29 3b 0d 09 | 47 58 44 69 73 70 6f 73 |hape);..|GXDispos|
|00004af0| 65 53 68 61 70 65 28 68 | 65 6c 6c 6f 53 68 61 70 |eShape(h|elloShap|
|00004b00| 65 29 3b 0d 7d 0d 59 6f | 75 20 63 61 6e 20 75 73 |e);.}.Yo|u can us|
|00004b10| 65 20 74 68 65 73 65 20 | 65 78 61 6d 70 6c 65 73 |e these |examples|
|00004b20| 20 74 6f 20 68 65 6c 70 | 20 79 6f 75 20 67 65 74 | to help| you get|
|00004b30| 20 73 74 61 72 74 65 64 | 20 77 69 74 68 20 64 72 | started| with dr|
|00004b40| 61 77 69 6e 67 20 74 65 | 78 74 20 69 6e 20 51 75 |awing te|xt in Qu|
|00004b50| 69 63 6b 44 72 61 77 20 | 47 58 2e 20 54 68 65 79 |ickDraw |GX. They|
|00004b60| 20 61 6c 73 6f 20 73 68 | 6f 77 20 73 6f 6d 65 20 | also sh|ow some |
|00004b70| 73 69 6d 69 6c 61 72 69 | 74 69 65 73 20 62 65 74 |similari|ties bet|
|00004b80| 77 65 65 6e 20 74 68 65 | 20 50 6f 73 74 53 63 72 |ween the| PostScr|
|00004b90| 69 70 74 20 6d 6f 64 65 | 6c 20 61 6e 64 20 74 68 |ipt mode|l and th|
|00004ba0| 65 20 51 75 69 63 6b 44 | 72 61 77 20 47 58 20 6d |e QuickD|raw GX m|
|00004bb0| 6f 64 65 6c 2e 20 42 6f | 74 68 20 68 61 76 65 20 |odel. Bo|th have |
|00004bc0| 66 6f 6e 74 20 65 6e 74 | 69 74 69 65 73 3a 20 69 |font ent|ities: i|
|00004bd0| 6e 20 50 6f 73 74 53 63 | 72 69 70 74 20 63 6f 64 |n PostSc|ript cod|
|00004be0| 65 20 69 74 d5 73 20 61 | 20 64 69 63 74 69 6f 6e |e it.s a| diction|
|00004bf0| 61 72 79 20 61 6e 64 20 | 69 6e 20 51 75 69 63 6b |ary and |in Quick|
|00004c00| 44 72 61 77 20 47 58 20 | 63 6f 64 65 20 69 74 d5 |Draw GX |code it.|
|00004c10| 73 20 61 6e 20 6f 62 6a | 65 63 74 2e 20 49 6e 20 |s an obj|ect. In |
|00004c20| 50 6f 73 74 53 63 72 69 | 70 74 20 63 6f 64 65 2c |PostScri|pt code,|
|00004c30| 20 74 68 65 20 66 6f 6e | 74 20 6d 61 74 72 69 78 | the fon|t matrix|
|00004c40| 20 65 6e 74 72 79 20 69 | 6e 20 74 68 65 20 64 69 | entry i|n the di|
|00004c50| 63 74 69 6f 6e 61 72 79 | 20 69 74 73 65 6c 66 20 |ctionary| itself |
|00004c60| 69 73 20 73 63 61 6c 65 | 64 20 62 79 20 74 68 65 |is scale|d by the|
|00004c70| 20 73 63 61 6c 65 66 6f | 6e 74 20 6f 70 65 72 61 | scalefo|nt opera|
|00004c80| 74 6f 72 20 74 6f 20 73 | 65 74 20 74 68 65 20 70 |tor to s|et the p|
|00004c90| 6f 69 6e 74 20 73 69 7a | 65 3b 20 69 6e 20 0d 51 |oint siz|e; in .Q|
|00004ca0| 75 69 63 6b 44 72 61 77 | 20 47 58 20 63 6f 64 65 |uickDraw| GX code|
|00004cb0| 2c 20 74 68 65 20 70 6f | 69 6e 74 20 73 69 7a 65 |, the po|int size|
|00004cc0| 20 69 73 20 63 6f 6e 74 | 61 69 6e 65 64 20 69 6e | is cont|ained in|
|00004cd0| 20 74 68 65 20 73 68 61 | 70 65 d5 73 20 73 74 79 | the sha|pe.s sty|
|00004ce0| 6c 65 20 61 6e 64 20 63 | 61 6e 20 62 65 20 73 65 |le and c|an be se|
|00004cf0| 74 20 62 79 20 61 20 63 | 61 6c 6c 20 74 6f 20 47 |t by a c|all to G|
|00004d00| 58 53 65 74 53 68 61 70 | 65 54 65 78 74 53 69 7a |XSetShap|eTextSiz|
|00004d10| 65 2e 20 46 6f 72 20 74 | 68 65 20 6d 6f 73 74 20 |e. For t|he most |
|00004d20| 70 61 72 74 2c 20 74 68 | 61 74 d5 73 20 69 74 20 |part, th|at.s it |
|00004d30| 66 6f 72 20 73 69 6d 69 | 6c 61 72 69 74 69 65 73 |for simi|larities|
|00004d40| 2e 0d 43 68 61 72 61 63 | 74 65 72 73 20 61 6e 64 |..Charac|ters and|
|00004d50| 20 67 6c 79 70 68 73 2e | 20 54 6f 20 75 6e 64 65 | glyphs.| To unde|
|00004d60| 72 73 74 61 6e 64 20 74 | 68 65 20 66 75 6c 6c 20 |rstand t|he full |
|00004d70| 63 61 70 61 62 69 6c 69 | 74 69 65 73 20 6f 66 20 |capabili|ties of |
|00004d80| 51 75 69 63 6b 44 72 61 | 77 20 47 58 20 74 79 70 |QuickDra|w GX typ|
|00004d90| 6f 67 72 61 70 68 79 2c | 20 79 6f 75 20 6d 75 73 |ography,| you mus|
|00004da0| 74 20 66 69 72 73 74 20 | 75 6e 64 65 72 73 74 61 |t first |understa|
|00004db0| 6e 64 20 74 68 65 20 64 | 69 66 66 65 72 65 6e 63 |nd the d|ifferenc|
|00004dc0| 65 20 62 65 74 77 65 65 | 6e 20 63 68 61 72 61 63 |e betwee|n charac|
|00004dd0| 74 65 72 73 20 61 6e 64 | 20 67 6c 79 70 68 73 2e |ters and| glyphs.|
|00004de0| 20 43 68 61 72 61 63 74 | 65 72 73 20 61 72 65 20 | Charact|ers are |
|00004df0| 73 79 6d 62 6f 6c 73 20 | 74 68 61 74 20 68 61 76 |symbols |that hav|
|00004e00| 65 20 6c 69 6e 67 75 69 | 73 74 69 63 20 6d 65 61 |e lingui|stic mea|
|00004e10| 6e 69 6e 67 2c 20 75 73 | 75 61 6c 6c 79 20 61 20 |ning, us|ually a |
|00004e20| 6c 65 74 74 65 72 20 66 | 72 6f 6d 20 61 6e 20 61 |letter f|rom an a|
|00004e30| 6c 70 68 61 62 65 74 2e | 20 47 6c 79 70 68 73 20 |lphabet.| Glyphs |
|00004e40| 61 72 65 20 72 65 6e 64 | 69 74 69 6f 6e 73 20 6f |are rend|itions o|
|00004e50| 66 20 74 68 6f 73 65 20 | 63 68 61 72 61 63 74 65 |f those |characte|
|00004e60| 72 73 20 6f 72 20 63 6f | 6d 62 69 6e 61 74 69 6f |rs or co|mbinatio|
|00004e70| 6e 73 20 6f 66 20 74 68 | 65 6d 2e 20 46 6f 72 20 |ns of th|em. For |
|00004e80| 65 78 61 6d 70 6c 65 2c | 20 66 6f 72 20 61 6e 79 |example,| for any|
|00004e90| 20 67 69 76 65 6e 20 63 | 68 61 72 61 63 74 65 72 | given c|haracter|
|00004ea0| 20 66 72 6f 6d 20 61 6e | 20 61 6c 70 68 61 62 65 | from an| alphabe|
|00004eb0| 74 2c 20 74 68 65 72 65 | 20 6d 61 79 20 62 65 20 |t, there| may be |
|00004ec0| 76 61 72 69 6f 75 73 20 | 66 6f 72 6d 73 20 6f 66 |various |forms of|
|00004ed0| 20 74 68 69 73 20 63 68 | 61 72 61 63 74 65 72 20 | this ch|aracter |
|00004ee0| 74 68 61 74 20 61 72 65 | 20 61 70 70 72 6f 70 72 |that are| appropr|
|00004ef0| 69 61 74 65 20 74 6f 20 | 64 72 61 77 20 61 74 20 |iate to |draw at |
|00004f00| 64 69 66 66 65 72 65 6e | 74 20 74 69 6d 65 73 20 |differen|t times |
|00004f10| 28 73 65 65 20 46 69 67 | 75 72 65 20 34 29 2e 0d |(see Fig|ure 4)..|
|00004f20| 46 69 67 75 72 65 20 34 | 0d 44 69 66 66 65 72 65 |Figure 4|.Differe|
|00004f30| 6e 74 20 47 6c 79 70 68 | 73 20 46 72 6f 6d 20 61 |nt Glyph|s From a|
|00004f40| 20 52 6f 6d 61 6e 20 46 | 6f 6e 74 0d 54 68 65 20 | Roman F|ont.The |
|00004f50| 6d 6f 73 74 20 63 6f 6d | 70 6c 65 78 20 74 65 78 |most com|plex tex|
|00004f60| 74 20 64 72 61 77 69 6e | 67 20 69 6e 20 51 75 69 |t drawin|g in Qui|
|00004f70| 63 6b 44 72 61 77 20 47 | 58 20 63 6f 6d 65 73 20 |ckDraw G|X comes |
|00004f80| 66 72 6f 6d 20 74 68 65 | 20 6c 61 79 6f 75 74 20 |from the| layout |
|00004f90| 73 68 61 70 65 2e 20 57 | 69 74 68 20 61 20 6c 61 |shape. W|ith a la|
|00004fa0| 79 6f 75 74 20 73 68 61 | 70 65 2c 20 74 68 65 20 |yout sha|pe, the |
|00004fb0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 73 70 65 63 |applicat|ion spec|
|00004fc0| 69 66 69 65 73 20 77 68 | 69 63 68 20 63 68 61 72 |ifies wh|ich char|
|00004fd0| 61 63 74 65 72 73 20 69 | 6e 20 74 68 65 20 6c 61 |acters i|n the la|
|00004fe0| 6e 67 75 61 67 65 20 6d | 61 6b 65 20 75 70 20 74 |nguage m|ake up t|
|00004ff0| 68 65 20 70 69 65 63 65 | 20 6f 66 20 74 65 78 74 |he piece| of text|
|00005000| 20 74 6f 20 62 65 20 64 | 69 73 70 6c 61 79 65 64 | to be d|isplayed|
|00005010| 2e 20 47 69 76 65 6e 20 | 74 68 65 20 6c 61 6e 67 |. Given |the lang|
|00005020| 75 61 67 65 20 61 6e 64 | 20 73 63 72 69 70 74 20 |uage and| script |
|00005030| 73 79 73 74 65 6d 20 73 | 70 65 63 69 66 69 65 64 |system s|pecified|
|00005040| 20 69 6e 20 74 68 65 20 | 6c 61 79 6f 75 74 20 73 | in the |layout s|
|00005050| 68 61 70 65 d5 73 20 73 | 74 79 6c 65 20 6f 62 6a |hape.s s|tyle obj|
|00005060| 65 63 74 2c 20 51 75 69 | 63 6b 44 72 61 77 20 47 |ect, Qui|ckDraw G|
|00005070| 58 20 63 61 6e 20 74 68 | 65 6e 20 66 69 67 75 72 |X can th|en figur|
|00005080| 65 20 6f 75 74 20 77 68 | 69 63 68 20 67 6c 79 70 |e out wh|ich glyp|
|00005090| 68 73 20 74 6f 20 75 73 | 65 20 66 6f 72 20 74 68 |hs to us|e for th|
|000050a0| 6f 73 65 20 63 68 61 72 | 61 63 74 65 72 73 2e 0d |ose char|acters..|
|000050b0| 54 68 65 20 74 6f 70 20 | 6c 69 6e 65 20 6f 66 20 |The top |line of |
|000050c0| 46 69 67 75 72 65 20 34 | 20 73 68 6f 77 73 20 74 |Figure 4| shows t|
|000050d0| 68 72 65 65 20 67 6c 79 | 70 68 73 20 66 72 6f 6d |hree gly|phs from|
|000050e0| 20 61 20 70 61 72 74 69 | 63 75 6c 61 72 20 52 6f | a parti|cular Ro|
|000050f0| 6d 61 6e 20 66 6f 6e 74 | 2e 20 54 68 65 79 d5 72 |man font|. They.r|
|00005100| 65 20 74 68 65 20 67 6c | 79 70 68 73 20 66 6f 72 |e the gl|yphs for|
|00005110| 20 6c 6f 77 65 72 63 61 | 73 65 20 66 2c 20 6c 6f | lowerca|se f, lo|
|00005120| 77 65 72 63 61 73 65 20 | 69 2c 20 61 6e 64 20 61 |wercase |i, and a|
|00005130| 20 6c 6f 77 65 72 63 61 | 73 65 20 66 69 20 6c 69 | lowerca|se fi li|
|00005140| 67 61 74 75 72 65 2e 20 | 54 68 65 20 6c 69 67 61 |gature. |The liga|
|00005150| 74 75 72 65 20 69 73 20 | 61 6e 20 65 78 61 6d 70 |ture is |an examp|
|00005160| 6c 65 20 6f 66 20 61 20 | 67 6c 79 70 68 20 74 68 |le of a |glyph th|
|00005170| 61 74 20 72 65 70 72 65 | 73 65 6e 74 73 20 74 77 |at repre|sents tw|
|00005180| 6f 20 63 68 61 72 61 63 | 74 65 72 73 2e 20 57 69 |o charac|ters. Wi|
|00005190| 74 68 20 61 20 6c 61 79 | 6f 75 74 20 73 68 61 70 |th a lay|out shap|
|000051a0| 65 2c 20 51 75 69 63 6b | 44 72 61 77 20 47 58 20 |e, Quick|Draw GX |
|000051b0| 63 61 6e 20 64 65 74 65 | 63 74 20 77 68 65 6e 20 |can dete|ct when |
|000051c0| 74 68 65 20 69 20 66 6f | 6c 6c 6f 77 73 20 74 68 |the i fo|llows th|
|000051d0| 65 20 66 20 61 6e 64 20 | 61 75 74 6f 6d 61 74 69 |e f and |automati|
|000051e0| 63 61 6c 6c 79 20 63 68 | 6f 6f 73 65 20 74 68 65 |cally ch|oose the|
|000051f0| 20 66 69 20 6c 69 67 61 | 74 75 72 65 20 67 6c 79 | fi liga|ture gly|
|00005200| 70 68 20 77 68 65 6e 20 | 64 72 61 77 69 6e 67 2e |ph when |drawing.|
|00005210| 20 54 68 69 73 20 61 6c | 6c 6f 77 73 20 74 68 65 | This al|lows the|
|00005220| 20 75 73 65 72 20 74 6f | 20 74 79 70 65 20 66 20 | user to| type f |
|00005230| 66 6f 6c 6c 6f 77 65 64 | 20 62 79 20 69 20 72 61 |followed| by i ra|
|00005240| 74 68 65 72 20 74 68 61 | 6e 20 68 61 76 69 6e 67 |ther tha|n having|
|00005250| 20 74 6f 20 66 69 67 75 | 72 65 20 6f 75 74 20 77 | to figu|re out w|
|00005260| 68 61 74 20 6b 65 79 20 | 63 6f 6d 62 69 6e 61 74 |hat key |combinat|
|00005270| 69 6f 6e 20 74 6f 20 74 | 79 70 65 20 61 6e 64 20 |ion to t|ype and |
|00005280| 77 68 61 74 20 66 6f 6e | 74 20 74 6f 20 73 65 6c |what fon|t to sel|
|00005290| 65 63 74 20 74 6f 20 67 | 65 74 20 74 68 65 20 66 |ect to g|et the f|
|000052a0| 69 20 6c 69 67 61 74 75 | 72 65 2e 0d 54 68 65 20 |i ligatu|re..The |
|000052b0| 62 6f 74 74 6f 6d 20 6c | 69 6e 65 20 6f 66 20 46 |bottom l|ine of F|
|000052c0| 69 67 75 72 65 20 34 20 | 69 6c 6c 75 73 74 72 61 |igure 4 |illustra|
|000052d0| 74 65 73 20 61 6e 6f 74 | 68 65 72 20 65 78 61 6d |tes anot|her exam|
|000052e0| 70 6c 65 20 6f 66 20 64 | 69 66 66 65 72 65 6e 74 |ple of d|ifferent|
|000052f0| 20 67 6c 79 70 68 73 20 | 66 6f 72 20 74 68 65 20 | glyphs |for the |
|00005300| 73 61 6d 65 20 63 68 61 | 72 61 63 74 65 72 2e 20 |same cha|racter. |
|00005310| 54 68 65 20 67 6c 79 70 | 68 20 6f 6e 20 74 68 65 |The glyp|h on the|
|00005320| 20 6c 65 66 74 20 69 73 | 20 74 68 65 20 6e 6f 72 | left is| the nor|
|00005330| 6d 61 6c 20 63 61 70 69 | 74 61 6c 20 41 20 66 6f |mal capi|tal A fo|
|00005340| 72 20 74 68 61 74 20 66 | 6f 6e 74 2e 20 54 68 65 |r that f|ont. The|
|00005350| 20 67 6c 79 70 68 20 0d | 6f 6e 20 74 68 65 20 72 | glyph .|on the r|
|00005360| 69 67 68 74 20 69 73 20 | 61 20 67 6c 79 70 68 20 |ight is |a glyph |
|00005370| 74 6f 20 75 73 65 20 61 | 74 20 74 68 65 20 62 65 |to use a|t the be|
|00005380| 67 69 6e 6e 69 6e 67 20 | 6f 66 20 74 68 65 20 6c |ginning |of the l|
|00005390| 69 6e 65 2e 20 57 69 74 | 68 20 61 20 6c 61 79 6f |ine. Wit|h a layo|
|000053a0| 75 74 20 73 68 61 70 65 | 2c 20 51 75 69 63 6b 44 |ut shape|, QuickD|
|000053b0| 72 61 77 20 47 58 20 64 | 65 74 65 63 74 73 20 77 |raw GX d|etects w|
|000053c0| 68 65 6e 20 74 68 65 20 | 63 68 61 72 61 63 74 65 |hen the |characte|
|000053d0| 72 20 69 73 20 61 74 20 | 74 68 65 20 62 65 67 69 |r is at |the begi|
|000053e0| 6e 6e 69 6e 67 20 6f 66 | 20 74 68 65 20 6c 69 6e |nning of| the lin|
|000053f0| 65 20 61 6e 64 20 61 75 | 74 6f 6d 61 74 69 63 61 |e and au|tomatica|
|00005400| 6c 6c 79 20 63 68 6f 6f | 73 65 73 20 74 68 65 20 |lly choo|ses the |
|00005410| 63 6f 72 72 65 63 74 20 | 67 6c 79 70 68 2e 0d 50 |correct |glyph..P|
|00005420| 6c 61 74 66 6f 72 6d 73 | 20 61 6e 64 20 65 6e 63 |latforms| and enc|
|00005430| 6f 64 69 6e 67 73 2e 20 | 49 6e 20 6d 6f 73 74 20 |odings. |In most |
|00005440| 76 65 72 73 69 6f 6e 73 | 20 6f 66 20 74 68 65 20 |versions| of the |
|00005450| 50 6f 73 74 53 63 72 69 | 70 74 20 6c 61 6e 67 75 |PostScri|pt langu|
|00005460| 61 67 65 2c 20 61 6e 79 | 20 67 69 76 65 6e 20 65 |age, any| given e|
|00005470| 6e 63 6f 64 69 6e 67 20 | 6f 66 20 61 20 66 6f 6e |ncoding |of a fon|
|00005480| 74 20 68 61 73 20 61 63 | 63 65 73 73 20 74 6f 20 |t has ac|cess to |
|00005490| 6f 6e 6c 79 20 32 35 36 | 20 67 6c 79 70 68 73 20 |only 256| glyphs |
|000054a0| 61 74 20 61 20 74 69 6d | 65 2e 20 49 66 20 61 20 |at a tim|e. If a |
|000054b0| 66 6f 6e 74 20 63 6f 6e | 74 61 69 6e 73 20 6d 6f |font con|tains mo|
|000054c0| 72 65 20 74 68 61 6e 20 | 32 35 36 20 67 6c 79 70 |re than |256 glyp|
|000054d0| 68 73 2c 20 79 6f 75 20 | 6d 75 73 74 20 75 73 65 |hs, you |must use|
|000054e0| 20 64 69 66 66 65 72 65 | 6e 74 20 66 6f 6e 74 20 | differe|nt font |
|000054f0| 64 69 63 74 69 6f 6e 61 | 72 69 65 73 2c 20 65 61 |dictiona|ries, ea|
|00005500| 63 68 20 77 69 74 68 20 | 61 20 64 69 66 66 65 72 |ch with |a differ|
|00005510| 65 6e 74 20 65 6e 63 6f | 64 69 6e 67 2e 20 49 6e |ent enco|ding. In|
|00005520| 20 65 66 66 65 63 74 2c | 20 74 68 65 20 61 70 70 | effect,| the app|
|00005530| 6c 69 63 61 74 69 6f 6e | 20 67 65 6e 65 72 61 74 |lication| generat|
|00005540| 69 6e 67 20 74 68 65 20 | 50 6f 73 74 53 63 72 69 |ing the |PostScri|
|00005550| 70 74 20 63 6f 64 65 20 | 6d 75 73 74 20 73 65 6c |pt code |must sel|
|00005560| 65 63 74 20 66 72 6f 6d | 20 64 69 66 66 65 72 65 |ect from| differe|
|00005570| 6e 74 20 66 6f 6e 74 20 | 64 69 63 74 69 6f 6e 61 |nt font |dictiona|
|00005580| 72 69 65 73 20 74 6f 20 | 63 72 65 61 74 65 20 61 |ries to |create a|
|00005590| 6c 6c 20 74 68 65 20 67 | 6c 79 70 68 73 20 69 6e |ll the g|lyphs in|
|000055a0| 20 61 20 67 69 76 65 6e | 20 74 79 70 65 66 61 63 | a given| typefac|
|000055b0| 65 2e 20 51 75 69 63 6b | 44 72 61 77 20 47 58 20 |e. Quick|Draw GX |
|000055c0| 63 61 6e 20 74 61 6b 65 | 20 61 64 76 61 6e 74 61 |can take| advanta|
|000055d0| 67 65 20 6f 66 20 66 6f | 6e 74 73 20 74 68 61 74 |ge of fo|nts that|
|000055e0| 20 63 6f 6e 74 61 69 6e | 20 75 70 20 74 6f 20 36 | contain| up to 6|
|000055f0| 35 35 33 35 20 67 6c 79 | 70 68 73 2c 20 61 6c 6c |5535 gly|phs, all|
|00005600| 20 6f 66 20 77 68 69 63 | 68 20 61 72 65 20 61 76 | of whic|h are av|
|00005610| 61 69 6c 61 62 6c 65 20 | 74 6f 20 61 6e 79 20 73 |ailable |to any s|
|00005620| 68 61 70 65 20 6f 62 6a | 65 63 74 2e 0d 54 68 65 |hape obj|ect..The|
|00005630| 20 62 79 74 65 73 20 63 | 6f 6e 74 61 69 6e 65 64 | bytes c|ontained|
|00005640| 20 69 6e 20 74 68 65 20 | 67 65 6f 6d 65 74 72 79 | in the |geometry|
|00005650| 20 6f 66 20 61 20 74 65 | 78 74 2c 20 6c 61 79 6f | of a te|xt, layo|
|00005660| 75 74 2c 20 6f 72 20 67 | 6c 79 70 68 20 73 68 61 |ut, or g|lyph sha|
|00005670| 70 65 20 63 61 6e 20 68 | 61 76 65 20 64 69 66 66 |pe can h|ave diff|
|00005680| 65 72 65 6e 74 20 6d 65 | 61 6e 69 6e 67 73 20 64 |erent me|anings d|
|00005690| 65 70 65 6e 64 69 6e 67 | 20 6f 6e 20 74 68 65 20 |epending| on the |
|000056a0| 67 78 46 6f 6e 74 50 6c | 61 74 66 6f 72 6d 20 61 |gxFontPl|atform a|
|000056b0| 6e 64 20 67 78 46 6f 6e | 74 53 63 72 69 70 74 20 |nd gxFon|tScript |
|000056c0| 61 74 74 72 69 62 75 74 | 65 73 20 73 65 74 20 69 |attribut|es set i|
|000056d0| 6e 20 74 68 65 20 73 74 | 79 6c 65 20 6f 62 6a 65 |n the st|yle obje|
|000056e0| 63 74 2e 20 57 68 65 6e | 20 67 78 46 6f 6e 74 50 |ct. When| gxFontP|
|000056f0| 6c 61 74 66 6f 72 6d 20 | 69 73 20 73 65 74 20 74 |latform |is set t|
|00005700| 6f 20 67 78 4d 61 63 69 | 6e 74 6f 73 68 50 6c 61 |o gxMaci|ntoshPla|
|00005710| 74 66 6f 72 6d 20 61 6e | 64 20 67 78 46 6f 6e 74 |tform an|d gxFont|
|00005720| 53 63 72 69 70 74 20 69 | 73 20 73 65 74 20 74 6f |Script i|s set to|
|00005730| 20 67 78 52 6f 6d 61 6e | 53 63 72 69 70 74 2c 20 | gxRoman|Script, |
|00005740| 74 68 65 20 73 74 72 65 | 61 6d 20 6f 66 20 62 79 |the stre|am of by|
|00005750| 74 65 73 20 6d 65 61 6e | 73 20 74 68 65 20 73 61 |tes mean|s the sa|
|00005760| 6d 65 20 74 68 69 6e 67 | 20 69 74 20 64 6f 65 73 |me thing| it does|
|00005770| 20 6f 6e 20 61 20 52 6f | 6d 61 6e 20 4d 61 63 69 | on a Ro|man Maci|
|00005780| 6e 74 6f 73 68 20 73 79 | 73 74 65 6d 20 74 6f 64 |ntosh sy|stem tod|
|00005790| 61 79 2e 20 49 66 20 67 | 78 46 6f 6e 74 50 6c 61 |ay. If g|xFontPla|
|000057a0| 74 66 6f 72 6d 20 69 73 | 20 73 65 74 20 74 6f 20 |tform is| set to |
|000057b0| 67 78 47 6c 79 70 68 50 | 6c 61 74 66 6f 72 6d 2c |gxGlyphP|latform,|
|000057c0| 20 74 68 65 20 62 79 74 | 65 73 20 61 72 65 20 74 | the byt|es are t|
|000057d0| 61 6b 65 6e 20 74 77 6f | 20 61 74 20 61 20 74 69 |aken two| at a ti|
|000057e0| 6d 65 20 61 73 20 61 20 | 73 68 6f 72 74 20 61 6e |me as a |short an|
|000057f0| 64 20 61 72 65 20 74 72 | 65 61 74 65 64 20 61 73 |d are tr|eated as|
|00005800| 20 67 6c 79 70 68 20 69 | 6e 64 69 63 65 73 20 69 | glyph i|ndices i|
|00005810| 6e 20 74 68 65 20 66 6f | 6e 74 3b 20 61 20 73 68 |n the fo|nt; a sh|
|00005820| 61 70 65 20 6f 62 6a 65 | 63 74 20 74 68 65 6e 20 |ape obje|ct then |
|00005830| 68 61 73 20 64 69 72 65 | 63 74 20 61 63 63 65 73 |has dire|ct acces|
|00005840| 73 20 74 6f 20 61 6c 6c | 20 74 68 65 20 67 6c 79 |s to all| the gly|
|00005850| 70 68 73 20 69 6e 20 61 | 20 66 6f 6e 74 2e 20 45 |phs in a| font. E|
|00005860| 61 63 68 20 66 6f 6e 74 | 20 69 6e 64 69 63 61 74 |ach font| indicat|
|00005870| 65 73 20 77 68 69 63 68 | 20 70 6c 61 74 66 6f 72 |es which| platfor|
|00005880| 6d 73 2c 20 6c 61 6e 67 | 75 61 67 65 73 2c 20 61 |ms, lang|uages, a|
|00005890| 6e 64 20 73 63 72 69 70 | 74 73 20 69 74 20 73 75 |nd scrip|ts it su|
|000058a0| 70 70 6f 72 74 73 2e 0d | 50 6f 73 69 74 69 6f 6e |pports..|Position|
|000058b0| 69 6e 67 20 67 6c 79 70 | 68 73 20 69 6e 20 61 20 |ing glyp|hs in a |
|000058c0| 6c 69 6e 65 20 6f 66 20 | 74 65 78 74 2e 20 54 68 |line of |text. Th|
|000058d0| 65 20 50 6f 73 74 53 63 | 72 69 70 74 20 6c 61 6e |e PostSc|ript lan|
|000058e0| 67 75 61 67 65 20 70 72 | 6f 76 69 64 65 73 20 73 |guage pr|ovides s|
|000058f0| 65 76 65 72 61 6c 20 6d | 65 74 68 6f 64 73 20 66 |everal m|ethods f|
|00005900| 6f 72 20 61 6c 6c 6f 77 | 69 6e 67 20 79 6f 75 72 |or allow|ing your|
|00005910| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 74 6f 20 | applica|tion to |
|00005920| 65 78 70 6c 69 63 69 74 | 6c 79 20 70 6f 73 69 74 |explicit|ly posit|
|00005930| 69 6f 6e 20 67 6c 79 70 | 68 73 20 6f 6e 20 61 20 |ion glyp|hs on a |
|00005940| 70 61 67 65 2e 20 54 68 | 65 20 73 69 6d 70 6c 65 |page. Th|e simple|
|00005950| 73 74 20 69 73 20 74 68 | 65 20 73 68 6f 77 20 6f |st is th|e show o|
|00005960| 70 65 72 61 74 6f 72 2e | 20 54 68 69 73 20 6f 70 |perator.| This op|
|00005970| 65 72 61 74 6f 72 20 73 | 69 6d 70 6c 79 20 64 72 |erator s|imply dr|
|00005980| 61 77 73 20 65 61 63 68 | 20 67 6c 79 70 68 20 73 |aws each| glyph s|
|00005990| 70 65 63 69 66 69 65 64 | 20 62 79 20 74 68 65 20 |pecified| by the |
|000059a0| 73 74 72 69 6e 67 20 61 | 6e 64 20 6d 6f 76 65 73 |string a|nd moves|
|000059b0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 70 6f 69 | the cur|rent poi|
|000059c0| 6e 74 20 62 79 20 74 68 | 65 20 61 64 76 61 6e 63 |nt by th|e advanc|
|000059d0| 65 20 77 69 64 74 68 20 | 6f 66 20 74 68 61 74 20 |e width |of that |
|000059e0| 67 6c 79 70 68 2e 20 54 | 68 65 20 61 73 68 6f 77 |glyph. T|he ashow|
|000059f0| 20 61 6e 64 20 61 77 69 | 64 74 68 73 68 6f 77 20 | and awi|dthshow |
|00005a00| 6f 70 65 72 61 74 6f 72 | 73 20 61 6c 6c 6f 77 20 |operator|s allow |
|00005a10| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |the appl|ication |
|00005a20| 74 6f 20 6d 6f 64 69 66 | 79 20 74 68 65 20 61 64 |to modif|y the ad|
|00005a30| 76 61 6e 63 65 20 77 69 | 64 74 68 20 66 6f 72 20 |vance wi|dth for |
|00005a40| 61 6c 6c 20 67 6c 79 70 | 68 73 20 6f 72 20 61 20 |all glyp|hs or a |
|00005a50| 70 61 72 74 69 63 75 6c | 61 72 20 67 6c 79 70 68 |particul|ar glyph|
|00005a60| 2e 20 57 69 74 68 20 74 | 68 65 20 6b 73 68 6f 77 |. With t|he kshow|
|00005a70| 20 6f 70 65 72 61 74 6f | 72 20 79 6f 75 20 63 61 | operato|r you ca|
|00005a80| 6e 20 63 61 6c 6c 20 61 | 20 67 65 6e 65 72 61 6c |n call a| general|
|00005a90| 20 70 72 6f 63 65 64 75 | 72 65 20 62 65 74 77 65 | procedu|re betwe|
|00005aa0| 65 6e 20 74 68 65 20 64 | 72 61 77 69 6e 67 20 6f |en the d|rawing o|
|00005ab0| 66 20 65 61 63 68 20 70 | 61 69 72 20 6f 66 20 67 |f each p|air of g|
|00005ac0| 6c 79 70 68 73 20 73 70 | 65 63 69 66 69 65 64 20 |lyphs sp|ecified |
|00005ad0| 62 79 20 74 68 65 20 73 | 74 72 69 6e 67 20 61 6e |by the s|tring an|
|00005ae0| 64 20 74 68 65 20 70 72 | 6f 63 65 64 75 72 65 20 |d the pr|ocedure |
|00005af0| 63 61 6e 20 6d 6f 64 69 | 66 79 20 74 68 65 20 67 |can modi|fy the g|
|00005b00| 72 61 70 68 69 63 73 20 | 73 74 61 74 65 20 62 65 |raphics |state be|
|00005b10| 66 6f 72 65 20 64 72 61 | 77 69 6e 67 20 74 68 65 |fore dra|wing the|
|00005b20| 20 6e 65 78 74 20 67 6c | 79 70 68 2e 20 54 68 69 | next gl|yph. Thi|
|00005b30| 73 20 70 72 6f 63 65 73 | 73 20 69 73 20 67 65 6e |s proces|s is gen|
|00005b40| 65 72 61 6c 6c 79 20 75 | 73 65 64 20 66 6f 72 20 |erally u|sed for |
|00005b50| 6b 65 72 6e 69 6e 67 2e | 20 49 6e 20 6b 65 72 6e |kerning.| In kern|
|00005b60| 69 6e 67 20 74 68 65 20 | 70 72 6f 63 65 64 75 72 |ing the |procedur|
|00005b70| 65 20 69 73 20 70 61 73 | 73 65 64 20 74 68 65 20 |e is pas|sed the |
|00005b80| 74 77 6f 20 63 68 61 72 | 61 63 74 65 72 20 63 6f |two char|acter co|
|00005b90| 64 65 73 2c 20 75 73 65 | 73 20 74 68 6f 73 65 20 |des, use|s those |
|00005ba0| 74 77 6f 20 63 6f 64 65 | 73 20 74 6f 20 6c 6f 6f |two code|s to loo|
|00005bb0| 6b 20 69 6e 20 61 20 6b | 65 72 6e 69 6e 67 20 74 |k in a k|erning t|
|00005bc0| 61 62 6c 65 2c 20 61 6e | 64 20 6d 6f 64 69 66 69 |able, an|d modifi|
|00005bd0| 65 73 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 70 |es the c|urrent p|
|00005be0| 6f 69 6e 74 20 61 70 70 | 72 6f 70 72 69 61 74 65 |oint app|ropriate|
|00005bf0| 6c 79 2e 20 54 68 69 73 | 20 6d 65 74 68 6f 64 2c |ly. This| method,|
|00005c00| 20 77 68 69 6c 65 20 74 | 6f 74 61 6c 6c 79 20 66 | while t|otally f|
|00005c10| 6c 65 78 69 62 6c 65 2c | 20 69 73 20 64 69 66 66 |lexible,| is diff|
|00005c20| 69 63 75 6c 74 20 74 6f | 20 75 73 65 20 62 65 63 |icult to| use bec|
|00005c30| 61 75 73 65 20 74 68 65 | 20 61 70 70 6c 69 63 61 |ause the| applica|
|00005c40| 74 69 6f 6e 20 6d 75 73 | 74 20 70 61 72 73 65 20 |tion mus|t parse |
|00005c50| 66 6f 6e 74 20 6d 65 74 | 72 69 63 20 66 69 6c 65 |font met|ric file|
|00005c60| 73 20 74 6f 20 64 65 72 | 69 76 65 20 6b 65 72 6e |s to der|ive kern|
|00005c70| 69 6e 67 20 74 61 62 6c | 65 73 20 74 6f 20 75 73 |ing tabl|es to us|
|00005c80| 65 20 77 69 74 68 20 74 | 68 65 20 6b 73 68 6f 77 |e with t|he kshow|
|00005c90| 20 70 72 6f 63 65 64 75 | 72 65 2e 0d 50 6f 73 74 | procedu|re..Post|
|00005ca0| 53 63 72 69 70 74 20 4c | 65 76 65 6c 20 32 20 70 |Script L|evel 2 p|
|00005cb0| 72 6f 76 69 64 65 73 20 | 61 20 77 61 79 20 74 6f |rovides |a way to|
|00005cc0| 20 70 6f 73 69 74 69 6f | 6e 20 63 68 61 72 61 63 | positio|n charac|
|00005cd0| 74 65 72 73 20 77 69 74 | 68 6f 75 74 20 65 78 65 |ters wit|hout exe|
|00005ce0| 63 75 74 69 6e 67 20 61 | 20 70 72 6f 63 65 64 75 |cuting a| procedu|
|00005cf0| 72 65 20 66 6f 72 20 65 | 61 63 68 20 67 6c 79 70 |re for e|ach glyp|
|00005d00| 68 20 64 72 61 77 6e 20 | d1 20 74 68 65 20 78 73 |h drawn |. the xs|
|00005d10| 68 6f 77 2c 20 79 73 68 | 6f 77 2c 20 61 6e 64 20 |how, ysh|ow, and |
|00005d20| 78 79 73 68 6f 77 20 6f | 70 65 72 61 74 6f 72 73 |xyshow o|perators|
|00005d30| 2e 20 57 69 74 68 20 74 | 68 65 73 65 20 6f 70 65 |. With t|hese ope|
|00005d40| 72 61 74 6f 72 73 20 74 | 68 65 20 61 70 70 6c 69 |rators t|he appli|
|00005d50| 63 61 74 69 6f 6e 20 63 | 61 6e 20 73 70 65 63 69 |cation c|an speci|
|00005d60| 66 79 20 61 6e 20 61 72 | 72 61 79 20 6f 66 20 61 |fy an ar|ray of a|
|00005d70| 64 76 61 6e 63 65 20 77 | 69 64 74 68 73 20 74 6f |dvance w|idths to|
|00005d80| 20 75 73 65 20 69 6e 20 | 70 6c 61 63 65 20 6f 66 | use in |place of|
|00005d90| 20 74 68 65 20 62 75 69 | 6c 74 2d 69 6e 20 61 64 | the bui|lt-in ad|
|00005da0| 76 61 6e 63 65 20 77 69 | 64 74 68 73 20 6f 66 20 |vance wi|dths of |
|00005db0| 74 68 65 20 66 6f 6e 74 | 2e 20 54 68 69 73 20 69 |the font|. This i|
|00005dc0| 73 20 66 61 73 74 65 72 | 20 74 68 61 6e 20 75 73 |s faster| than us|
|00005dd0| 69 6e 67 20 74 68 65 20 | 6b 73 68 6f 77 20 6f 70 |ing the |kshow op|
|00005de0| 65 72 61 74 6f 72 2e 20 | 41 67 61 69 6e 2c 20 74 |erator. |Again, t|
|00005df0| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 6d |he appli|cation m|
|00005e00| 75 73 74 20 67 65 6e 65 | 72 61 74 65 20 74 68 65 |ust gene|rate the|
|00005e10| 20 61 64 76 61 6e 63 65 | 20 77 69 64 74 68 73 20 | advance| widths |
|00005e20| 74 6f 20 75 73 65 2c 20 | 75 73 75 61 6c 6c 79 20 |to use, |usually |
|00005e30| 62 79 20 70 61 72 73 69 | 6e 67 20 66 6f 6e 74 20 |by parsi|ng font |
|00005e40| 6d 65 74 72 69 63 20 74 | 61 62 6c 65 73 20 61 6e |metric t|ables an|
|00005e50| 64 20 64 65 72 69 76 69 | 6e 67 20 6b 65 72 6e 69 |d derivi|ng kerni|
|00005e60| 6e 67 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 2e 0d |ng infor|mation..|
|00005e70| 49 74 d5 73 20 70 6f 73 | 73 69 62 6c 65 20 66 6f |It.s pos|sible fo|
|00005e80| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 20 74 |r applic|ations t|
|00005e90| 6f 20 67 65 6e 65 72 61 | 74 65 20 50 6f 73 74 53 |o genera|te PostS|
|00005ea0| 63 72 69 70 74 20 63 6f | 64 65 20 74 68 61 74 20 |cript co|de that |
|00005eb0| 75 73 65 73 20 74 68 65 | 20 6b 73 68 6f 77 20 6f |uses the| kshow o|
|00005ec0| 70 65 72 61 74 6f 72 20 | 6f 72 20 74 68 65 20 78 |perator |or the x|
|00005ed0| 73 68 6f 77 2c 20 79 73 | 68 6f 77 2c 20 61 6e 64 |show, ys|how, and|
|00005ee0| 20 78 79 73 68 6f 77 20 | 6f 70 65 72 61 74 6f 72 | xyshow |operator|
|00005ef0| 73 20 74 6f 20 6a 75 73 | 74 69 66 79 2c 20 6b 65 |s to jus|tify, ke|
|00005f00| 72 6e 2c 20 61 6e 64 20 | 74 72 61 63 6b 20 74 65 |rn, and |track te|
|00005f10| 78 74 2e 20 49 6e 20 51 | 75 69 63 6b 44 72 61 77 |xt. In Q|uickDraw|
|00005f20| 20 47 58 2c 20 61 20 6c | 61 79 6f 75 74 20 73 68 | GX, a l|ayout sh|
|00005f30| 61 70 65 20 64 6f 65 73 | 20 74 68 69 73 20 61 75 |ape does| this au|
|00005f40| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 2c 20 61 73 20 |tomatica|lly, as |
|00005f50| 73 70 65 63 69 66 69 65 | 64 20 62 79 20 6d 65 74 |specifie|d by met|
|00005f60| 72 69 63 73 20 69 6e 20 | 74 68 65 20 0d 51 75 69 |rics in |the .Qui|
|00005f70| 63 6b 44 72 61 77 20 47 | 58 20 66 6f 6e 74 2e 20 |ckDraw G|X font. |
|00005f80| 45 61 63 68 20 66 6f 6e | 74 20 63 6f 6e 74 61 69 |Each fon|t contai|
|00005f90| 6e 73 20 74 61 62 6c 65 | 73 20 74 68 61 74 20 73 |ns table|s that s|
|00005fa0| 70 65 63 69 66 79 20 6b | 65 72 6e 69 6e 67 20 70 |pecify k|erning p|
|00005fb0| 61 69 72 73 20 77 69 74 | 68 20 6b 65 72 6e 69 6e |airs wit|h kernin|
|00005fc0| 67 20 61 6d 6f 75 6e 74 | 73 2c 20 6f 70 74 69 6d |g amount|s, optim|
|00005fd0| 61 6c 20 74 72 61 63 6b | 69 6e 67 20 76 61 6c 75 |al track|ing valu|
|00005fe0| 65 73 2c 20 61 6e 64 20 | 6f 70 74 69 6d 61 6c 20 |es, and |optimal |
|00005ff0| 63 68 6f 69 63 65 73 20 | 66 6f 72 20 68 6f 77 20 |choices |for how |
|00006000| 6a 75 73 74 69 66 69 63 | 61 74 69 6f 6e 20 73 68 |justific|ation sh|
|00006010| 6f 75 6c 64 20 6f 63 63 | 75 72 2e 20 59 6f 75 72 |ould occ|ur. Your|
|00006020| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 63 61 6e | applica|tion can|
|00006030| 20 6f 76 65 72 72 69 64 | 65 20 74 68 65 73 65 20 | overrid|e these |
|00006040| 76 61 6c 75 65 73 20 69 | 66 20 79 6f 75 20 63 68 |values i|f you ch|
|00006050| 6f 6f 73 65 2c 20 62 75 | 74 20 74 68 65 20 76 61 |oose, bu|t the va|
|00006060| 6c 75 65 73 20 69 6e 20 | 74 68 65 20 66 6f 6e 74 |lues in |the font|
|00006070| 20 61 72 65 20 77 72 69 | 74 74 65 6e 20 62 79 20 | are wri|tten by |
|00006080| 74 68 65 20 66 6f 6e 74 | 20 64 65 73 69 67 6e 65 |the font| designe|
|00006090| 72 20 61 6e 64 20 74 68 | 65 72 65 66 6f 72 65 20 |r and th|erefore |
|000060a0| 63 61 75 73 65 20 51 75 | 69 63 6b 44 72 61 77 20 |cause Qu|ickDraw |
|000060b0| 47 58 20 74 6f 20 70 6f | 73 69 74 69 6f 6e 20 74 |GX to po|sition t|
|000060c0| 68 65 20 67 6c 79 70 68 | 73 20 61 73 20 74 68 65 |he glyph|s as the|
|000060d0| 20 66 6f 6e 74 20 64 65 | 73 69 67 6e 65 72 20 69 | font de|signer i|
|000060e0| 6e 74 65 6e 64 65 64 2e | 20 59 6f 75 72 20 61 70 |ntended.| Your ap|
|000060f0| 70 6c 69 63 61 74 69 6f | 6e 20 6e 65 65 64 20 6e |plicatio|n need n|
|00006100| 6f 74 20 70 61 72 73 65 | 20 74 68 65 20 66 6f 6e |ot parse| the fon|
|00006110| 74 20 6d 65 74 72 69 63 | 20 74 61 62 6c 65 73 20 |t metric| tables |
|00006120| 61 6e 64 20 70 6f 73 69 | 74 69 6f 6e 20 67 6c 79 |and posi|tion gly|
|00006130| 70 68 73 20 64 69 72 65 | 63 74 6c 79 2e 0d 57 68 |phs dire|ctly..Wh|
|00006140| 65 6e 20 79 6f 75 20 75 | 73 65 20 6c 61 79 6f 75 |en you u|se layou|
|00006150| 74 20 6f 72 20 67 6c 79 | 70 68 20 73 68 61 70 65 |t or gly|ph shape|
|00006160| 73 2c 20 74 65 78 74 20 | 63 61 6e 20 68 61 76 65 |s, text |can have|
|00006170| 20 6d 75 6c 74 69 70 6c | 65 20 73 74 79 6c 65 20 | multipl|e style |
|00006180| 72 75 6e 73 2e 20 54 68 | 69 73 20 61 6c 6c 6f 77 |runs. Th|is allow|
|00006190| 73 20 61 20 73 69 6e 67 | 6c 65 20 73 68 61 70 65 |s a sing|le shape|
|000061a0| 20 6f 62 6a 65 63 74 20 | 74 6f 20 73 77 69 74 63 | object |to switc|
|000061b0| 68 20 62 65 74 77 65 65 | 6e 20 66 6f 6e 74 73 2c |h betwee|n fonts,|
|000061c0| 20 73 69 7a 65 73 2c 20 | 74 65 78 74 20 66 61 63 | sizes, |text fac|
|000061d0| 65 73 2c 20 61 6e 64 20 | 6c 61 6e 67 75 61 67 65 |es, and |language|
|000061e0| 73 20 61 73 20 6d 61 6e | 79 20 74 69 6d 65 73 20 |s as man|y times |
|000061f0| 61 73 20 64 65 73 69 72 | 65 64 20 28 73 65 65 20 |as desir|ed (see |
|00006200| 46 69 67 75 72 65 20 35 | 29 2e 0d 46 69 67 75 72 |Figure 5|)..Figur|
|00006210| 65 20 35 0d 41 20 53 68 | 61 70 65 20 4f 62 6a 65 |e 5.A Sh|ape Obje|
|00006220| 63 74 20 57 69 74 68 20 | 4d 75 6c 74 69 70 6c 65 |ct With |Multiple|
|00006230| 20 53 74 79 6c 65 20 52 | 75 6e 73 0d 49 66 20 79 | Style R|uns.If y|
|00006240| 6f 75 20 77 61 6e 74 20 | 74 68 65 20 61 70 70 6c |ou want |the appl|
|00006250| 69 63 61 74 69 6f 6e 20 | 74 6f 20 68 61 76 65 20 |ication |to have |
|00006260| 64 69 72 65 63 74 20 63 | 6f 6e 74 72 6f 6c 20 6f |direct c|ontrol o|
|00006270| 76 65 72 20 70 6f 73 69 | 74 69 6f 6e 69 6e 67 20 |ver posi|tioning |
|00006280| 67 6c 79 70 68 73 2c 20 | 75 73 65 20 61 20 67 6c |glyphs, |use a gl|
|00006290| 79 70 68 20 73 68 61 70 | 65 20 6f 62 6a 65 63 74 |yph shap|e object|
|000062a0| 20 72 61 74 68 65 72 20 | 74 68 61 6e 20 61 20 6c | rather |than a l|
|000062b0| 61 79 6f 75 74 20 73 68 | 61 70 65 20 6f 62 6a 65 |ayout sh|ape obje|
|000062c0| 63 74 2e 20 47 6c 79 70 | 68 20 73 68 61 70 65 73 |ct. Glyp|h shapes|
|000062d0| 20 62 79 70 61 73 73 20 | 74 68 65 20 61 75 74 6f | bypass |the auto|
|000062e0| 6d 61 74 69 63 20 70 6f | 73 69 74 69 6f 6e 69 6e |matic po|sitionin|
|000062f0| 67 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 2e 20 54 |g inform|ation. T|
|00006300| 68 69 73 20 61 70 70 72 | 6f 61 63 68 20 69 73 20 |his appr|oach is |
|00006310| 73 69 6d 69 6c 61 72 20 | 74 6f 20 75 73 69 6e 67 |similar |to using|
|00006320| 20 50 6f 73 74 53 63 72 | 69 70 74 20 6f 70 65 72 | PostScr|ipt oper|
|00006330| 61 74 6f 72 73 2e 20 57 | 68 65 6e 20 75 73 69 6e |ators. W|hen usin|
|00006340| 67 20 61 20 67 6c 79 70 | 68 20 73 68 61 70 65 2c |g a glyp|h shape,|
|00006350| 20 79 6f 75 20 73 70 65 | 63 69 66 79 20 65 78 61 | you spe|cify exa|
|00006360| 63 74 6c 79 20 77 68 69 | 63 68 20 67 6c 79 70 68 |ctly whi|ch glyph|
|00006370| 73 20 61 72 65 20 74 6f | 20 62 65 20 64 72 61 77 |s are to| be draw|
|00006380| 6e 20 69 6e 20 77 68 61 | 74 20 73 74 79 6c 65 73 |n in wha|t styles|
|00006390| 20 61 6e 64 20 61 74 20 | 77 68 61 74 20 70 6f 73 | and at |what pos|
|000063a0| 69 74 69 6f 6e 73 20 61 | 6e 64 20 61 6e 67 6c 65 |itions a|nd angle|
|000063b0| 73 2e 20 54 68 65 6e 2c | 20 77 68 65 6e 20 47 58 |s. Then,| when GX|
|000063c0| 44 72 61 77 53 68 61 70 | 65 20 69 73 20 63 61 6c |DrawShap|e is cal|
|000063d0| 6c 65 64 2c 20 69 74 20 | 75 73 65 73 20 74 68 69 |led, it |uses thi|
|000063e0| 73 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 66 6f |s inform|ation fo|
|000063f0| 72 20 72 65 6e 64 65 72 | 69 6e 67 2e 20 0d 55 73 |r render|ing. .Us|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.